Created
July 29, 2019 18:20
-
-
Save AlexKaravaev/1b9d9ef212012bea6229ca8c5d7ff767 to your computer and use it in GitHub Desktop.
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
# Count mean values for each adress for all dates given | |
adress_dfs = [df_data for _, df_data in df.groupby('Адрес')] | |
columns = adress_dfs[0].columns[1:-2].tolist() | |
df = pd.DataFrame(columns=adress_dfs[0].columns[1:].tolist()) | |
for i in range(len(adress_dfs)): | |
row = [adress_dfs[i]['Адрес'].iloc[0]] + adress_dfs[i].describe().loc['mean'].tolist()[:-2] +[adress_dfs[i]['lon'].iloc[0]] +[adress_dfs[i]['lat'].iloc[0]] | |
df.loc[i] = row |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment