Home > other > How python will not row, column name non numeric TXT files into dataframe format
How python will not row, column name non numeric TXT files into dataframe format
Time:09-26
Readlines () to read directly after the dataframe, only is a column, ReadLine () read line by line, add is always an error, the great god give directions, thank you
CodePudding user response:
This is a standard CSV format file you With read_csv method directly line
The import pandas as pd My_data=https://bbs.csdn.net/topics/pd.read_csv (' D:/temp/yourfilename CSV, the header=None, names=[' col1, col2, col3, 'col4', 'col5', 'col6', 'col7', 'col8'], index_col=None)
CodePudding user response:
Thank you, settled, beginners, too obsessed with suffix. TXT the
CodePudding user response:
Could you tell me if there are a lot of columns, names themselves set up?