In [1]:
import gym
import pandas as pd

In [2]:
results = gym.monitoring.load_results("/tmp/gym-results/fbs-v1")

In [21]:
len(results['episode_rewards'])


Out[21]:
8596

In [3]:
results.keys()


Out[3]:
dict_keys(['data_sources', 'initial_reset_timestamps', 'manifests', 'initial_reset_timestamp', 'timestamps', 'episode_lengths', 'videos', 'env_info', 'episode_rewards', 'episode_types'])

In [6]:
%matplotlib inline
res_df = pd.DataFrame(results['episode_rewards'])
res_df.plot(figsize=(16,10))


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x112d230b8>

In [19]:
pd.rolling_quantile(res_df, 100, 0.5).plot()


/usr/local/anaconda/anaconda3/lib/python3.5/site-packages/ipykernel/__main__.py:1: FutureWarning: pd.rolling_quantile is deprecated for DataFrame and will be removed in a future version, replace with 
	DataFrame.rolling(center=False,window=100).quantile(quantile=0.5)
  if __name__ == '__main__':
Out[19]:
<matplotlib.axes._subplots.AxesSubplot at 0x113264b00>

In [14]:
pd.rolling_quantile(res_df, a§a).plot()


/usr/local/anaconda/anaconda3/lib/python3.5/site-packages/ipykernel/__main__.py:1: FutureWarning: pd.rolling_mean is deprecated for DataFrame and will be removed in a future version, replace with 
	DataFrame.rolling(center=False,window=100).mean()
  if __name__ == '__main__':
Out[14]:
<matplotlib.axes._subplots.AxesSubplot at 0x113c18ba8>