使用pd.read_csv()时,遇到ValueError: NumPy boolean array indexing assignment cannot assign 0 input values to the N output values where the mask is true这个问题。
我当时找了很久,都没有找到问题所在。
直到打开读取的文件之后,才注意到,因为我的表格如下:
a | |
---|---|
1 | 2 |
缺少了一个表头,却多出了元素。
解决办法就是添加一个表头即可。如下
a | b |
---|---|
1 | 2 |
使用pd.read_csv()时,遇到ValueError: NumPy boolean array indexing assignment cannot assign 0 input values to the N output values where the mask is true这个问题。
我当时找了很久,都没有找到问题所在。
直到打开读取的文件之后,才注意到,因为我的表格如下:
a | |
---|---|
1 | 2 |
缺少了一个表头,却多出了元素。
解决办法就是添加一个表头即可。如下
a | b |
---|---|
1 | 2 |