diff --git a/notebook.ipynb b/notebook.ipynb new file mode 100644 index 0000000..37524e2 --- /dev/null +++ b/notebook.ipynb @@ -0,0 +1,496 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [], + "source": [ + "colNames = ['date', 'check']\n", + "meditateChecks = pd.read_csv('LoopHabits/002 Meditate/Checkmarks.csv', names=colNames, header=None)\n", + "meditateScore = pd.read_csv('LoopHabits/002 Meditate/Scores.csv', names=colNames, header=None)" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": {}, + "outputs": [], + "source": [ + "def only2019(df):\n", + " df['drop'] = df['date'].apply(lambda x: 0 if x[0:4] == '2019' else 1)\n", + " df = df.drop(df[df['drop'] == 1].index)\n", + " df = df.drop(columns=['drop'])\n", + " return df\n", + "\n", + "def onlyMarch(df):\n", + " df['drop'] = df['date'].apply(lambda x: 1 if x[5:7] == '01' or x[5:7] == '02' else 0)\n", + " df = df.drop(df[df['drop'] == 1].index)\n", + " df = df.drop(columns=['drop'])\n", + " return df\n", + "\n", + "def longestZero(df):\n", + " pass\n", + "\n", + "def longestStreak(df):\n", + " pass\n", + "\n", + "def bestMonth(df):\n", + " pass\n", + "\n", + "def worstMonth(df):\n", + " pass\n", + "\n", + "def plotScore(df):\n", + " pass" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | date | \n", + "check | \n", + "
---|---|---|
17 | \n", + "2019-12-31 | \n", + "0 | \n", + "
18 | \n", + "2019-12-30 | \n", + "0 | \n", + "
19 | \n", + "2019-12-29 | \n", + "0 | \n", + "
20 | \n", + "2019-12-28 | \n", + "0 | \n", + "
21 | \n", + "2019-12-27 | \n", + "0 | \n", + "
22 | \n", + "2019-12-26 | \n", + "0 | \n", + "
23 | \n", + "2019-12-25 | \n", + "0 | \n", + "
24 | \n", + "2019-12-24 | \n", + "2 | \n", + "
25 | \n", + "2019-12-23 | \n", + "1 | \n", + "
26 | \n", + "2019-12-22 | \n", + "1 | \n", + "
27 | \n", + "2019-12-21 | \n", + "2 | \n", + "
28 | \n", + "2019-12-20 | \n", + "2 | \n", + "
29 | \n", + "2019-12-19 | \n", + "0 | \n", + "
30 | \n", + "2019-12-18 | \n", + "0 | \n", + "
31 | \n", + "2019-12-17 | \n", + "0 | \n", + "
32 | \n", + "2019-12-16 | \n", + "2 | \n", + "
33 | \n", + "2019-12-15 | \n", + "0 | \n", + "
34 | \n", + "2019-12-14 | \n", + "0 | \n", + "
35 | \n", + "2019-12-13 | \n", + "2 | \n", + "
36 | \n", + "2019-12-12 | \n", + "0 | \n", + "
37 | \n", + "2019-12-11 | \n", + "0 | \n", + "
38 | \n", + "2019-12-10 | \n", + "0 | \n", + "
39 | \n", + "2019-12-09 | \n", + "0 | \n", + "
40 | \n", + "2019-12-08 | \n", + "0 | \n", + "
41 | \n", + "2019-12-07 | \n", + "0 | \n", + "
42 | \n", + "2019-12-06 | \n", + "0 | \n", + "
43 | \n", + "2019-12-05 | \n", + "0 | \n", + "
44 | \n", + "2019-12-04 | \n", + "0 | \n", + "
45 | \n", + "2019-12-03 | \n", + "0 | \n", + "
46 | \n", + "2019-12-02 | \n", + "0 | \n", + "
... | \n", + "... | \n", + "... | \n", + "
293 | \n", + "2019-03-30 | \n", + "1 | \n", + "
294 | \n", + "2019-03-29 | \n", + "1 | \n", + "
295 | \n", + "2019-03-28 | \n", + "2 | \n", + "
296 | \n", + "2019-03-27 | \n", + "2 | \n", + "
297 | \n", + "2019-03-26 | \n", + "0 | \n", + "
298 | \n", + "2019-03-25 | \n", + "0 | \n", + "
299 | \n", + "2019-03-24 | \n", + "2 | \n", + "
300 | \n", + "2019-03-23 | \n", + "0 | \n", + "
301 | \n", + "2019-03-22 | \n", + "1 | \n", + "
302 | \n", + "2019-03-21 | \n", + "2 | \n", + "
303 | \n", + "2019-03-20 | \n", + "0 | \n", + "
304 | \n", + "2019-03-19 | \n", + "2 | \n", + "
305 | \n", + "2019-03-18 | \n", + "0 | \n", + "
306 | \n", + "2019-03-17 | \n", + "0 | \n", + "
307 | \n", + "2019-03-16 | \n", + "2 | \n", + "
308 | \n", + "2019-03-15 | \n", + "0 | \n", + "
309 | \n", + "2019-03-14 | \n", + "1 | \n", + "
310 | \n", + "2019-03-13 | \n", + "2 | \n", + "
311 | \n", + "2019-03-12 | \n", + "0 | \n", + "
312 | \n", + "2019-03-11 | \n", + "2 | \n", + "
313 | \n", + "2019-03-10 | \n", + "0 | \n", + "
314 | \n", + "2019-03-09 | \n", + "0 | \n", + "
315 | \n", + "2019-03-08 | \n", + "0 | \n", + "
316 | \n", + "2019-03-07 | \n", + "0 | \n", + "
317 | \n", + "2019-03-06 | \n", + "0 | \n", + "
318 | \n", + "2019-03-05 | \n", + "0 | \n", + "
319 | \n", + "2019-03-04 | \n", + "0 | \n", + "
320 | \n", + "2019-03-03 | \n", + "0 | \n", + "
321 | \n", + "2019-03-02 | \n", + "0 | \n", + "
322 | \n", + "2019-03-01 | \n", + "0 | \n", + "
306 rows × 2 columns
\n", + "