"print(platform.python_version())"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": []
+ },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Todo List\n",
"\n",
- "- [ ] trim each chart to just a single, selected year\n",
+ "- [x] add calculated year to the metadata\n",
"- [ ] make one chart per year\n",
"- [x] make sure all the data files are getting loaded"
]
"import glob\n",
"import os\n",
"\n",
- "data_files = glob.glob(os.path.expanduser('~\\\\Data\\\\*.json'))\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "import os\n",
+ "data_files = glob.glob(os.path.expanduser('~\\\\Data\\\\*.json'))\n",
"\n",
"for file in data_files:\n",
- "\tprint(f\"{file}\", os.path.getsize(file))\n"
+ "\tprint(f\"{file}\", os.path.getsize(file))\n",
+ "\n"
]
},
{
"metadata": {},
"outputs": [],
"source": [
+ "\n",
"dfp = df\n",
- "dfp['mile'] = [d.get('title') if d else None for d in dfp.milestone]\n",
+ "# dfp['mile'] = [m.get('title') if m else None for m in dfp.milestone]\n",
+ "dfp['mile'] = [m.get('title') if hasattr(m, 'get') else None for m in dfp['milestone']]\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
"closed_dates = pd.to_datetime(df['closedAt'], format='ISO8601')\n",
"dfp['year'] = closed_dates.dt.year\n",
"\n",
- "# TODO: Split by YEAR before dropping 'closedAt'\n",
"dfp.drop(columns=['closedAt','milestone', 'url'], inplace=True)\n",
"print(dfp)"
]