Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -698,7 +698,7 @@ with tab3:
|
|
| 698 |
plot_high_date = pitcher_gamelog_table['Date'].max()
|
| 699 |
|
| 700 |
with col2:
|
| 701 |
-
|
| 702 |
working_data = working_data[working_data['Date'] >= sp_low_date]
|
| 703 |
working_data = working_data[working_data['Date'] <= sp_high_date]
|
| 704 |
working_data = working_data[working_data['Team'].isin(sp_team_var1)]
|
|
@@ -727,10 +727,28 @@ with tab3:
|
|
| 727 |
working_data - pd.concat(join_list, join='outer', axis=1)
|
| 728 |
working_data = working_data.reset_index()
|
| 729 |
elif date_var_3 == '10-day Averages':
|
| 730 |
-
|
| 731 |
-
|
| 732 |
-
|
| 733 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 734 |
else:
|
| 735 |
working_data = working_data
|
| 736 |
|
|
|
|
| 698 |
plot_high_date = pitcher_gamelog_table['Date'].max()
|
| 699 |
|
| 700 |
with col2:
|
| 701 |
+
|
| 702 |
working_data = working_data[working_data['Date'] >= sp_low_date]
|
| 703 |
working_data = working_data[working_data['Date'] <= sp_high_date]
|
| 704 |
working_data = working_data[working_data['Team'].isin(sp_team_var1)]
|
|
|
|
| 727 |
working_data - pd.concat(join_list, join='outer', axis=1)
|
| 728 |
working_data = working_data.reset_index()
|
| 729 |
elif date_var_3 == '10-day Averages':
|
| 730 |
+
if plot_count == "One":
|
| 731 |
+
working_data['Date'] = pd.to_datetime(working_data['Date'])
|
| 732 |
+
working_data = working_data.set_index('Date')
|
| 733 |
+
working_data = working_data[plot_var1].rolling('10D').mean()
|
| 734 |
+
working_data = working_data.reset_index()
|
| 735 |
+
elif plot_count == "Two":
|
| 736 |
+
working_data['Date'] = pd.to_datetime(working_data['Date'])
|
| 737 |
+
working_data = working_data.set_index('Date')
|
| 738 |
+
working_data1 = working_data[plot_var1].rolling('10D').mean()
|
| 739 |
+
working_data2 = working_data[plot_var2].rolling('10D').mean()
|
| 740 |
+
join_list = [working_data1, working_data2]
|
| 741 |
+
working_data - pd.concat(join_list, join='outer', axis=1)
|
| 742 |
+
working_data = working_data.reset_index()
|
| 743 |
+
elif plot_count == "Three":
|
| 744 |
+
working_data['Date'] = pd.to_datetime(working_data['Date'])
|
| 745 |
+
working_data = working_data.set_index('Date')
|
| 746 |
+
working_data1 = working_data[plot_var1].rolling('10D').mean()
|
| 747 |
+
working_data2 = working_data[plot_var2].rolling('10D').mean()
|
| 748 |
+
working_data3 = working_data[plot_var3].rolling('10D').mean()
|
| 749 |
+
join_list = [working_data1, working_data2, working_data3]
|
| 750 |
+
working_data - pd.concat(join_list, join='outer', axis=1)
|
| 751 |
+
working_data = working_data.reset_index()
|
| 752 |
else:
|
| 753 |
working_data = working_data
|
| 754 |
|