Created
December 21, 2017 12:02
-
-
Save zed/85fc90f9be8b20d879f7f8817a7eeb5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"[Stack Overflow: Number of active experts per week (2016-2017)](https://data.stackexchange.com/ru/query/773714/number-of-active-experts-per-week?year=2016&week=0#graph)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"df = pd.read_csv('QueryResults-773714-2017.csv')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"2015 83.3137254902\n", | |
"2016 139.843137255\n", | |
"2017 126.673469388\n" | |
] | |
} | |
], | |
"source": [ | |
"for y in range(2015, 2018):\n", | |
" print(y, df[(df.YR_WK>y) & (df.YR_WK < (y+1))].NumActiveExperts.mean())" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment