Python 无法使用pandas将csv文件中的字符串转换为int

Python 无法使用pandas将csv文件中的字符串转换为int,python,pandas,Python,Pandas,我是新来的熊猫,有一个问题 在使用pandas读取csv文件时,无法将字符串转换为浮点值,到目前为止我一直使用 pd.read_csv('Book2.csv',delimiter=',', index_col=0, skiprows=1,converters={'Open Price (Rs.)':float}) 还尝试了dtype 两者都给出了一个错误 我正在共享csv文件链接: 你可以做 modelFeatures = [contains all the columns' names yo

我是新来的熊猫,有一个问题 在使用pandas读取csv文件时,无法将字符串转换为浮点值,到目前为止我一直使用

pd.read_csv('Book2.csv',delimiter=',', index_col=0, skiprows=1,converters={'Open Price (Rs.)':float})
还尝试了dtype

两者都给出了一个错误 我正在共享csv文件链接: 你可以做

modelFeatures = [contains all the columns' names you use]
df = df[modelFeatures].astype(float)

选中CSV文件中的第1873行-它有一个标题行(列标签)