我想以数据框格式打开文本文件,但是我尝试打开它,如下图所示
但是我的实际文本文件看起来像
"2018rank
","City
","State[c]
","2018estimate
","2010Census
","Change
","2016 land area
","2016 population density
","Location
"
"1
","New York City[d]
"," New York
","8,398,748
","8,175,133
","+2.74%
","301.5 sq mi
","780.9 km2
","28,317/sq mi
","10,933/km2
","40°39′49″N 73°56′19″W / 40.6635°N 73.9387°W / 40.6635; -73.9387 (1 New York City)
"
data = pd.DataFrame.from_csv("table_data.txt",index_col=None)