Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Add column based on others
Post: RE: Add column based on others

appreciated **thumbsup**
devesh_sahu Data Science 8 4,011 Apr-03-2021, 07:39 AM
    Thread: Add column based on others
Post: RE: Add column based on others

(Apr-01-2021, 09:49 AM)timste Wrote: Hi there Thank you for your idea! I recently sorted the problem using a for-loop with a empty id column and if current_id == old_id then id = id + 1 and using ...
devesh_sahu Data Science 8 4,011 Apr-03-2021, 07:37 AM
    Thread: Add column based on others
Post: RE: Add column based on others

import pandas as pd import numpy data = {'Volume': ['50', '100', '100', '90', '60', '200', '150', '80', '70'], 'GlacierID': ['a', 'a', 'b', 'b', 'c', 'd', 'd', 'd', 'e']} df = pd.DataFrame(da...
devesh_sahu Data Science 8 4,011 Apr-01-2021, 09:24 AM
    Thread: Add column based on others
Post: RE: Add column based on others

(Mar-27-2021, 10:52 AM)timste Wrote: Hi there, This is a dataframe with glacial lakes and their volume: data = {'Volume': ['50', '100', '100', '90', '60', '200', '150', '80', '70'], 'Glac...
devesh_sahu Data Science 8 4,011 Apr-01-2021, 09:20 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020