【发布时间】:2020-08-04 14:48:49
【问题描述】:
我尝试将列提取到列表中,然后获取值,但没有发生。我还需要保留 NaN。 该列有一个结构 -
df['geocoded_column']
0 {'type': 'Point', 'coordinates': [-117.009178,...
1 NaN
2 NaN
3 {'type': 'Point', 'coordinates': [-104.612123,...
4 {'type': 'Point', 'coordinates': [-86.043072, ...
...
2726 {'type': 'Point', 'coordinates': [-87.879139, ...
2727 {'type': 'Point', 'coordinates': [-95.266593, ...
2728 {'type': 'Point', 'coordinates': [-92.317039, ...
2729 {'type': 'Point', 'coordinates': [-83.017686, ...
2730 {'type': 'Point', 'coordinates': [-91.528653, ...
df['geocoded_column'][0] -
{'type': 'Point', 'coordinates': [-117.009178, 32.779435]}
I need to segregate it into the type -
Latitude Longitude
-117.117.009178 32.779435
NaN NaN
【问题讨论】:
标签: python python-3.x pandas list dataframe