Created
February 20, 2021 21:06
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
found new ways to stay updated