In this post, we will see how to resolve How to rewrite or add a column start from 1 in python
Question:
I have a dataframe like this and I want to re-rankStartup Rank
starting from 1,2,3,4… to end.
Or can I add a column start from 1,2,3,4…. and remove the Startup Rank
column?
Best Answer:
If you want to preserve the relative ranking, you can subtract the min value – 1:If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review