You can use groupby
and apply
function join
:
print df.groupby('value')['tempx'].apply(' '.join).reset_index()
value tempx
0 1.5 picture1 picture555 picture255 picture365 pict...
More Related Contents:
- how to calculation cost time [closed]
- Pandas: Adding new column to dataframe which is a copy of the index column
- pandas: filter rows of DataFrame with operator chaining
- Pandas groupby: How to get a union of strings
- How do I create test and train samples from one dataframe with pandas?
- pandas groupby sort within groups
- Applying function with multiple arguments to create a new pandas column
- Python Pandas max value in a group as a new column
- Convert columns to string in Pandas
- Count frequency of values in pandas DataFrame column
- append dataframe to excel with pandas
- How to dynamically update a plot in a loop in IPython notebook (within one cell)
- Efficiently replace values from a column to another column Pandas DataFrame
- How to iterate over consecutive chunks of Pandas dataframe efficiently
- Why can pandas DataFrames change each other?
- Precision lost while using read_csv in pandas
- Copying MultiIndex dataframes with pd.read_clipboard?
- Convert pandas dataframe from wide to long
- Get list of pandas dataframe columns based on data type
- pandas.read_csv: how to skip comment lines
- Adding a ‘count’ column to the result of a groupby in pandas?
- Pandas: Reading Excel with merged cells
- Pandas groupby with categories with redundant nan
- Datetime conversion – How to extract the inferred format?
- Python numpy: cannot convert datetime64[ns] to datetime64[D] (to use with Numba)
- Slicing multiple ranges of columns in Pandas, by list of names
- How to compute jaccard similarity from a pandas dataframe
- Pandas: remove duplicates that exist in any order
- Difference between df[x], df[[x]], df[‘x’] , df[[‘x’]] and df.x
- Numpy.dtype has the wrong size, try recompiling