Skip to content

Instantly share code, notes, and snippets.

@Abuton
Created February 20, 2021 21:06
Show Gist options
  • Save Abuton/a8bd133289692e2bc823ef14033a0602 to your computer and use it in GitHub Desktop.
Save Abuton/a8bd133289692e2bc823ef14033a0602 to your computer and use it in GitHub Desktop.
Convert an array series to pandas dataframe. From a single series (column) to multiple columns
import pandas as pd
percentiles = df['arrival_delay_deciles'].apply(pd.Series)
percentiles.rename(columns = lambda x : '{0}%'.format(x*10), inplace=True)
percentiles.head()
@Abuton
Copy link
Author

Abuton commented Feb 20, 2021

found new ways to stay updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment