Save dataframe index as cartodb_id
See original GitHub issueIf I’m not wrong this is something that was working in the 0.9.2
version of CARTOframes.
The dataframe index was being saved as cartodb_id and then used as the index when reading from CARTO to a dataframe as well.
Do we still want this to work in the same way in the new
versions?
cc. @andy-esch
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to convert index of a pandas dataframe into a column
In the rare event that you want to preserve the index and turn the index into a column, you can do the following:...
Read more >How to Convert Index to Column in Pandas Dataframe?
Converting Index to Columns By default, each row of the dataframe has an index value. The rows in the dataframe are assigned index...
Read more >How to Convert Index to Column in Pandas DataFrame
You may use the following approach to convert index to column in Pandas DataFrame (with an “index” header): df.reset_index(inplace=True).
Read more >Pandas Set Index to Column in DataFrame
In order to set index to column in pandas DataFrame use reset_index() method. ... Preserve Index as-is and add one index as column...
Read more >Set index for DataFrame in pandas | by Pete Houston - Medium
I will show you how to set index for DataFrame in pandas. To get started, I will use the ... As you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Either way, it’s not worth doing something automagically.
OK that was my next question. So then we’ll make sure to stick to the behaviour you mentioned.
Thanks!
Fix this test
test_cartocontext_write_index
df.index
as a columncartodb_id
as index