【发布时间】:2016-02-06 15:23:09
【问题描述】:
我正在尝试将此表转换为 pandas DataFrame。我的问题是熊猫无法识别表中的负值。
import pandas as pd
url = 'http://www.scb.se/en_/Finding-statistics/Statistics-by-subject-area/Prices-and-Consumption/Consumer-Price-Index/Consumer-Price-Index-CPI/Aktuell-Pong/33779/Consumer-Price-Index-CPI/287612/'
df = pd.read_html(url,index_col='Year',header=0,parse_dates=True)[0]
print(df)
有什么建议可以继续吗?
提前谢谢你
【问题讨论】:
-
我不确定您所说的“识别负值”是什么意思?当我运行你的代码时,我在输出中得到了正值和负值。