摘要:
# pandas使用浮点值NaN(Not a Number)表示浮点和非浮点数组中的缺失数据。 from pandas import Series,DataFrame import pandas as pd import numpy as np string_data = Series(['aard 阅读全文
摘要:
df = DataFrame(np.random.randn(7,3)) df.ix[:5,1] = NA# 报错 AttributeError: 'DataFrame' object has no attribute 'ix'# 改为 df.iloc[:5,1] = NA 阅读全文
摘要:
from pandas import Series,DataFrame import pandas as pd obj = Series(['c','a','d','a','a','b','b','c','c']) print(obj.unique()) # 唯一值 ''' ['c' 'a' 'd' 阅读全文
摘要:
from pandas import DataFrame from pandas_datareader import data as web all_data = {} for ticker in ['AAPL','IBM','MSFT','GOOG']: all_data[ticker] = we 阅读全文
摘要:
import pandas.io.data as web报错ModuleNotFoundError: No module named 'pandas.io.data'安装pandas_datareader后改为 from pandas_datareader import data as web 阅读全文