AttributeError: ‘DataFrame‘ object has no attribute ‘ix‘

ix方法较为复杂,新版本pandas 使用 loc函数将它优化

import pandas as pd
import numpy as np
exmple1 = pd.Series(range(10))
print(exmple1.loc[:3])

你可能感兴趣的:(python,pandas,机器学习)