我从这里下载了全局二氧化碳排放的.csv:
将其放入Geopandas DataFrame中,并将其与全世界的Shapefile合并。
在排放的.CSV中,列名称都是正确的。但是,在执行 ghg.head()
之后,在原始列名称上方有一行,带有'field_1','field_2'...
我想知道如何删除该行不需要的列名称,而下面的行是列名。我已连接 GHG.head90
以下输出。 输出图像
请让我知道我能做什么,谢谢。
I downloaded a .csv of Global CO2 emission from here: https://data.worldbank.org/indicator/EN.ATM.CO2E.KT?locations=EU
Put it into a GeoPandas DataFrame and merged it with a shapefile of the whole world.
In the .csv of emissions, the column names are all correct. However, after doing ghg.head()
, there is a row above the original column names, with 'field_1', 'field_2' ...
I was wondering how I would go about removing that row of unwanted column names, and instead have the row below be the column names. I have attached the ghg.head90
output below. Image of output
Please let me know what I can do, thanks.
发布评论
评论(1)
已下载相同的文件。关键部分是在加载 CSV 时跳过前三行。
Have downloaded same file. Key part is to skip first three rows when you load CSV.