python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
GroupBy based on condition Pyspark
I have a peculiar problem to which I don't see an easy solution (and efficient one). I have a list of addresses (more than 10M) with different user_time_active. I also have count per user_time_active ...
Martin Walczyński
Votes: 0
Answers: 1
groupby multiple values in a column
I have a subset of a dataframe here:
data = {'Name': ['ch1', 'ch2', 'ch3', 'ch4', 'ch5', 'ch6'],
'Time': [1,2,3,4,5,6],
'Week' : [1, 2, 3, 2, 3, 2]
}
dfx = pd.DataFrame(da...
JakeP
Votes: 0
Answers: 2
Pandas DataFrame Groupby two columns and get different relation in same keys insert list
I have this table :
Head Relation Tail
0 9 1 0
1 10 1 11
2 9 0 23
3 10 1 61
4 9 0 12
5 10 0 66...
Vallinox
Votes: 0
Answers: 1
How to aggregate one column based on another column in Pandas
year fruit sales
0 2010 Apple 10
1 2011 Apple 20
2 2010 Banans 50000
3 2011 Banans 30
What I want is like this:
fruit min_year sales_2010 max_year sales_2011...
user1633272
Votes: 0
Answers: 2