查找相关资料,发现一个棒棒的解决方法:
首先把csv文件以记事本的格式打开(如果记事本打开后是乱码,我们可以把csv数据粘贴到记事本上后保存)
allElectronicsData=open(r"D:\test.txt",‘rt’,encoding=‘utf-8’)下面的格式打开即可
03-21
7453
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-19
9736
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-22
1975
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-29
1230
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-07
1948
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-20
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-02
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)