Questions tagged [groupby]
A groupby operation: splits the data, applies a function to each group, and combines the results.
8
questions with no upvoted or accepted answers
3
votes
0answers
23 views
User defined aggregations on data of around 200GB where row order matters
I am working with "medium large" data of around 200GB. The data are long form log files, where there are several thousand logs for each "entity". The entities are actually flights ...
1
vote
0answers
29 views
Custom DataFrame format for exporting to excel sheets
I have the following DataFrame and I want it exported in an excel file with different sheets having different words as shown in the image
...
1
vote
1answer
37 views
Normalize data from different groups
I have data that have been grouped in 27 groups by different criteria. The reason for these groupings is to show that each group has a different behavior. However, I would like to normalize everything ...
1
vote
1answer
65 views
Group_by 2 variables and pivot_wider distribution based on 2 others
Performing some calculations on a dataframe and stuck trying to calculate a few percentages. Trying to append 3 additional columns added for %POS/NEG/NEU. E.g., the sum of amount col for all ...
0
votes
1answer
19 views
Pandas groupby show value counts
I have a dataframe with 3 columns: job_type (5 categories), age_group (5 categories) and answer (0, 1, 2 or 3)
job_type | age_group | answer
By
...
0
votes
0answers
16 views
Accessing group elements in groupby
I had a doubt about groupby operations. Lets suppose I have grouped my data based on one column and got 5 groups as output. I know that we can iterate over these groups and apply functions to them as ...
0
votes
1answer
41 views
How to group by one column and count frequency from other column for each item in the previous column in python?
I am trying to group my data by the 'ID' column. Then I want to count the frequency of 'sequence' for each 'ID'. Here is a sample of the data frame:
...
0
votes
1answer
171 views
How to combine rows after Pandas Groupby function
May I know how to combine several rows into one single row after I used Pandas groupby function?
In below example, I would like to to group the data by Employee ID, Customer Last Name and Customer ...