Skip to content
Advertisement

Tag: dataframe

How to find the most frequent appearence in one column for different values in a different column of a grouped dataframe?

The question is not so clear I guess, so here is an example: given a dataframe: company_name company_size company_acitivity 7 eleven 5 restaurant 7 eleven 5 supermarket 7 eleven 10 supermarket goldman sachs 100 bank goldman sachs 200 restaurant goldman sachs 200 bank I want to group the dataframe by company name and then replace the values in the organization_size

Combine dataframes based on multiple conditions in python

Table A Table B Table C These are example tables that represent dataframes that I’m going to create from seperate excel sheets. Basically there’s a many to many relationship going on and I want to be able to create a combined sheet that will roll up the “amount” total (from Table A) for each year of the item (Table B).

Advertisement