Spaces:
Running
Running
Update pitch_summary_functions.py
Browse files
pitch_summary_functions.py
CHANGED
@@ -793,8 +793,10 @@ def table_summary(df,
|
|
793 |
cmap_sum = matplotlib.colors.LinearSegmentedColormap.from_list("", ['#648FFF','#FFFFFF','#FFB000',])
|
794 |
|
795 |
ax.axis('off')
|
|
|
796 |
df_group['spin_direction_adj'] = [(x + 180) for x in df_group['spin_direction']]
|
797 |
#(((df_group.groupby('pitch_description').mean()[['spin_direction_adj']] %360 % 30 / 30 /100 *60).round(2) *10).round(0)//1.5/4 )
|
|
|
798 |
clock_time = ((df_group.groupby('pitch_description').mean()['spin_direction_adj']) %360 // 30 )+ (((df_group.groupby('pitch_description').mean()['spin_direction_adj'] %360 % 30 / 30 /100 *60).round(2) *10).round(0)//1.5/4 )
|
799 |
# print('Clocks')
|
800 |
# print(clock_time)
|
|
|
793 |
cmap_sum = matplotlib.colors.LinearSegmentedColormap.from_list("", ['#648FFF','#FFFFFF','#FFB000',])
|
794 |
|
795 |
ax.axis('off')
|
796 |
+
df_group['spin_direction'] = df_group['spin_direction'].fillna(0)
|
797 |
df_group['spin_direction_adj'] = [(x + 180) for x in df_group['spin_direction']]
|
798 |
#(((df_group.groupby('pitch_description').mean()[['spin_direction_adj']] %360 % 30 / 30 /100 *60).round(2) *10).round(0)//1.5/4 )
|
799 |
+
|
800 |
clock_time = ((df_group.groupby('pitch_description').mean()['spin_direction_adj']) %360 // 30 )+ (((df_group.groupby('pitch_description').mean()['spin_direction_adj'] %360 % 30 / 30 /100 *60).round(2) *10).round(0)//1.5/4 )
|
801 |
# print('Clocks')
|
802 |
# print(clock_time)
|