csv
import pandas as pd
f=pd.read_csv(r'g:\testtt44.csv')
import numpy as np
frame = pd.DataFrame([[0,1,2,3],[np.NaN,np.NaN,np.NaN,7],[8,9,10,11],[12,13,14,15]], columns=['ball', 'pen', 'pencil', 'paper'])
print(frame)
frame.to_csv(r'g:\testtt445.csv', index=False,header=False, na_rep='0')
网友评论