Python create a new dataframe and fill the data

new_dataframe = pd.DataFrame (columns = ['Longitude', 'Latitude'])
Assuming that there is already a list of longitude and a list of latitude, then
new_dataframe ['Longitude'] = lons
new_dataframe ['Latitude'] = lats

If the insert data is looped line by line, then
new_dataframe = new_dataframe.append ({'Longitude': 130, 'Latitude': 45}, ignore_index = True)

Published 35 original articles · Liked 20 · Visitors 50,000+

Guess you like

Origin blog.csdn.net/weixin_39875181/article/details/104478862