python.pandas read and write CSV file
2017-07-25 16:27
615 查看
#read and write csv of pandas import pandas as pd goog =pd.read_csv(r'C:\python\demo\LiaoXueFeng\data\test_vrt.csv',index_col=0) goog=goog.reindex(pd.to_datetime(goog.index)) print(goog.head()) print(goog.tail()) data2 = [{'july': 9999, 'han': 5000, 'zewei': 1000}, {'july': 9999, 'han': 5000, 'zewei': 1000}, {'july': 9999, 'han': 5000, 'zewe2i': 1000}] df3 = pd.DataFrame(data2) df3.to_csv(r'C:\python\demo\LiaoXueFeng\data\goog2.csv',encoding='GBK',mode='a')
相关文章推荐
- python.pandas read and write CSV file
- Read and write excel file with format by pandas and xlwt libraries of python
- Python3 pandas read_csv 读取txt文件报错:IOError: Initializing from file failed
- Qt Read and Write Csv File
- [Python] Read and plot data from csv file
- Python3 pandas read_csv 报错:IOError: Initializing from file failed
- Java read and write csv file(注意事项)
- [zz] Read and write a properties file
- WriteAndReadFile
- python pandas IO tools 之read_csv文件读写参数详解
- Python file read and wirte
- Spring Batch Read from DB and Write to File
- python_20171122_python3.6.1 pd.read_csv()输入中文路径OSError: Initializing from file failed
- file operate in python (open write read close )
- Java CSV读--Read And Parse CSV File In Java
- Read and Write a /proc File
- read and write excel file as a table
- 【python学习笔记】pandas.read_csv参数整理
- 解决pandas.read_csv()出现OSError:Initializing from file failed问题
- Python: Write UTF-8 characters to csv file