I used the following
grouped = df.groupby('A')
df = grouped.aggregate(lambda x: tuple(x))
df['grouped'] = df['B'] + df['C']
More Related Contents:
- Adding value labels on a matplotlib bar chart
- Pandas column of lists, create a row for each list element
- Compare two DataFrames and output their differences side-by-side
- Selecting a row of pandas series/dataframe by integer index
- pandas: merge (join) two data frames on multiple columns
- How do I find numeric columns in Pandas?
- How do I find the closest values in a Pandas series to an input number?
- How to display custom values on a bar plot
- How do I count the NaN values in a column in pandas DataFrame?
- How to drop duplicates based on two or more subsets criteria in Pandas data-frame
- How to normalize json correctly by Python Pandas
- Replace invalid values with None in Pandas DataFrame
- How to filter a dataframe of dates by a particular month/day?
- How to show all columns’ names on a large pandas dataframe?
- Python remove stop words from pandas dataframe
- Pandas monthly rolling operation
- Count number of words per row
- How to select all columns except one in pandas?
- Shift column in pandas dataframe up by one?
- In Pandas, does .iloc method give a copy or view?
- Move non-empty cells to the left in pandas DataFrame
- pandas logical and operator with and without brackets produces different results [duplicate]
- How to json_normalize a column with NaNs
- Convert Pandas Series to DateTime in a DataFrame
- How to use a conditional statement based on DataFrame boolean value in pandas
- Stacked bar chart in Seaborn
- How to add/subtract time (hours, minutes, etc.) from a Pandas DataFrame.Index whos objects are of type datetime.time?
- How to easily share a sample dataframe using df.to_dict()
- Remove substring from column based on another column
- Round float columns in pandas dataframe