generated from CorrelAid/python-bare-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#43] Cache downloaded data; Implement feature with decorator; added …
…tests
- Loading branch information
Showing
10 changed files
with
502 additions
and
195 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "69e1d305", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%load_ext autoreload\n", | ||
"%autoreload 2" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "ff9eca4f", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# only if you get an error from below\n", | ||
"# from pygenesis import init_config\n", | ||
"# init_config()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "4a207a77", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import pandas as pd\n", | ||
"\n", | ||
"from pygenesis.cube import get_cubefile_data" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"id": "6e6df177", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"params = {\"values\": \"true\", \"metadata\": \"true\", \"additionals\": \"false\"}\n", | ||
"data = get_cubefile_data(name=\"47414BJ002\", **params)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"id": "a8bcd5b4", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div>\n", | ||
"<style scoped>\n", | ||
" .dataframe tbody tr th:only-of-type {\n", | ||
" vertical-align: middle;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe tbody tr th {\n", | ||
" vertical-align: top;\n", | ||
" }\n", | ||
"\n", | ||
" .dataframe thead th {\n", | ||
" text-align: right;\n", | ||
" }\n", | ||
"</style>\n", | ||
"<table border=\"1\" class=\"dataframe\">\n", | ||
" <thead>\n", | ||
" <tr style=\"text-align: right;\">\n", | ||
" <th></th>\n", | ||
" <th>DINSG</th>\n", | ||
" <th>WZ08N7</th>\n", | ||
" <th>WERTE4</th>\n", | ||
" <th>JAHR</th>\n", | ||
" <th>UMS103</th>\n", | ||
" <th>QUALITAET</th>\n", | ||
" <th>GESPERRT</th>\n", | ||
" <th>WERT-VERFAELSCHT</th>\n", | ||
" </tr>\n", | ||
" </thead>\n", | ||
" <tbody>\n", | ||
" <tr>\n", | ||
" <th>0</th>\n", | ||
" <td>DG</td>\n", | ||
" <td>WZ08-49-01</td>\n", | ||
" <td>NOMINAL</td>\n", | ||
" <td>2015</td>\n", | ||
" <td>100.0</td>\n", | ||
" <td>e</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>0.0</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>1</th>\n", | ||
" <td>DG</td>\n", | ||
" <td>WZ08-49-01</td>\n", | ||
" <td>NOMINAL</td>\n", | ||
" <td>2016</td>\n", | ||
" <td>99.3</td>\n", | ||
" <td>e</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>0.0</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>2</th>\n", | ||
" <td>DG</td>\n", | ||
" <td>WZ08-49-01</td>\n", | ||
" <td>NOMINAL</td>\n", | ||
" <td>2017</td>\n", | ||
" <td>105.7</td>\n", | ||
" <td>e</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>0.0</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>3</th>\n", | ||
" <td>DG</td>\n", | ||
" <td>WZ08-49-01</td>\n", | ||
" <td>NOMINAL</td>\n", | ||
" <td>2018</td>\n", | ||
" <td>111.6</td>\n", | ||
" <td>e</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>0.0</td>\n", | ||
" </tr>\n", | ||
" <tr>\n", | ||
" <th>4</th>\n", | ||
" <td>DG</td>\n", | ||
" <td>WZ08-49-01</td>\n", | ||
" <td>NOMINAL</td>\n", | ||
" <td>2019</td>\n", | ||
" <td>115.6</td>\n", | ||
" <td>e</td>\n", | ||
" <td>NaN</td>\n", | ||
" <td>0.0</td>\n", | ||
" </tr>\n", | ||
" </tbody>\n", | ||
"</table>\n", | ||
"</div>" | ||
], | ||
"text/plain": [ | ||
" DINSG WZ08N7 WERTE4 JAHR UMS103 QUALITAET GESPERRT \\\n", | ||
"0 DG WZ08-49-01 NOMINAL 2015 100.0 e NaN \n", | ||
"1 DG WZ08-49-01 NOMINAL 2016 99.3 e NaN \n", | ||
"2 DG WZ08-49-01 NOMINAL 2017 105.7 e NaN \n", | ||
"3 DG WZ08-49-01 NOMINAL 2018 111.6 e NaN \n", | ||
"4 DG WZ08-49-01 NOMINAL 2019 115.6 e NaN \n", | ||
"\n", | ||
" WERT-VERFAELSCHT \n", | ||
"0 0.0 \n", | ||
"1 0.0 \n", | ||
"2 0.0 \n", | ||
"3 0.0 \n", | ||
"4 0.0 " | ||
] | ||
}, | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"data.head()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "fed610c9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"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.9.7" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
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
Oops, something went wrong.