Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Save dataframe index as cartodb_id

See original GitHub issue

If 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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

alrocarcommented, Apr 3, 2019

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.


alrocarcommented, Apr 4, 2019

Fix this test test_cartocontext_write_index

  • Upload df.index as a column
  • Keep cartodb_id as index
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found