1
我试图使用熊猫提供的插入功能,here但由于某种原因,无法让我的系列调整到正确的值。我把它们铸成了float64,但是这似乎没有帮助。任何建议?无法正确使用熊猫插入一系列
代码:
for feature in price_data:
print price_data[feature]
print "type:"
print type(price_data[feature])
newSeries = price_data[feature].astype(float).interpolate()
print "newSeries: "
print newSeries
输出:
0 178.9000
1 0.0000
2 178.1200
Name: open_price, dtype: object
type:
<class 'pandas.core.series.Series'>
newSeries:
0 178.90
1 0.00
2 178.12
Name: open_price, dtype: float64
完全忽略了......感谢您的时间! – user3547551