'How to get Dataframe after applying groupby and should not be in list or string in python [duplicate]
Phone_no Date Problem
1 2020-01-19 G
1 2020-01-19 A
1 2020-01-27 B
1 2020-01-28 C
1 2020-01-28 H
2 2020-01-19 T
3 2020-01-04 U
3 2020-01-22 P
4 2020-01-12 E
5 2020-01-01 G
5 2020-01-11 A
2 2020-01-31 I
2 2020-01-31 E
**I want to apply groupby on Phone_no,Date and want data should bein dataframe as mention below **
Phone_no Date Problem
1 2020-01-19 G,A
1 2020-01-27 B
1 2020-01-28 C,H
2 2020-01-19 T
2 2020-01-31 I,E
3 2020-01-04 U
3 2020-01-22 P
4 2020-01-12 E
5 2020-01-01 G
5 2020-01-11 A
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|