16 lines
479 B
Python
16 lines
479 B
Python
# -*- coding: utf-8 -*-
|
|||
|
|
"""分析百家号重新导出的单篇数据"""
|
||
|
|
import sys
|
||
|
|
import pandas as pd
|
||
|
|
|
||
|
|
sys.stdout.reconfigure(encoding="utf-8")
|
||
|
|
|
||
|
|
df = pd.read_excel(r"E:\Download\单篇数据.xlsx", sheet_name="data")
|
||
|
|
df.columns = [str(c).strip() for c in df.columns]
|
||
|
|
print("列:", list(df.columns))
|
||
|
|
print("行数:", len(df))
|
||
|
|
print("日期范围:", df["发布时间"].min(), "~", df["发布时间"].max())
|
||
|
|
print()
|
||
|
|
|
||
|
|
print("=== 全部数据 ===")
|
||
|
|
print(df.to_string(index=False))
|