Created
March 9, 2023 22:01
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": "code", | |
"execution_count": 1, | |
"id": "6221b5b1-d974-4167-9350-bcfa864f4e10", | |
"metadata": { | |
"tags": [] | |
}, | |
"outputs": [], | |
"source": [ | |
"from datetime import datetime\n", | |
"from scipy import constants" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "45232365-044b-4257-aec9-85a93f7c569f", | |
"metadata": { | |
"tags": [], | |
"user_expressions": [ | |
{ | |
"expression": "datetime.now().strftime('%H:%M:%S')", | |
"result": { | |
"data": { | |
"text/plain": "'22:57:42'" | |
}, | |
"metadata": {}, | |
"status": "ok" | |
} | |
}, | |
{ | |
"expression": "f\"{constants.pi:.2f}\" ", | |
"result": { | |
"data": { | |
"text/plain": "'3.14'" | |
}, | |
"metadata": {}, | |
"status": "ok" | |
} | |
} | |
] | |
}, | |
"source": [ | |
"# Some constants:\n", | |
"\n", | |
"* This cell was executed at {eval}`datetime.now().strftime('%H:%M:%S')`\n", | |
"* The number of pi: $ \\pi = $ {eval}`f\"{constants.pi:.2f}\" `\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "559de7e8-ccf6-49e6-a558-34450dde6297", | |
"metadata": { | |
"tags": [], | |
"user_expressions": [] | |
}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"x = pd.DataFrame({'A': [1, 2, 3]})" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "8cb16029-3766-427c-afcf-4de6ac1bfb05", | |
"metadata": { | |
"tags": [], | |
"user_expressions": [ | |
{ | |
"expression": "x ", | |
"result": { | |
"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>A</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2</td>\n </tr>\n <tr>\n <th>2</th>\n <td>3</td>\n </tr>\n </tbody>\n</table>\n</div>", | |
"text/plain": " A\n0 1\n1 2\n2 3" | |
}, | |
"metadata": {}, | |
"status": "ok" | |
} | |
}, | |
{ | |
"expression": "x.describe()", | |
"result": { | |
"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>A</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>count</th>\n <td>3.0</td>\n </tr>\n <tr>\n <th>mean</th>\n <td>2.0</td>\n </tr>\n <tr>\n <th>std</th>\n <td>1.0</td>\n </tr>\n <tr>\n <th>min</th>\n <td>1.0</td>\n </tr>\n <tr>\n <th>25%</th>\n <td>1.5</td>\n </tr>\n <tr>\n <th>50%</th>\n <td>2.0</td>\n </tr>\n <tr>\n <th>75%</th>\n <td>2.5</td>\n </tr>\n <tr>\n <th>max</th>\n <td>3.0</td>\n </tr>\n </tbody>\n</table>\n</div>", | |
"text/plain": " A\ncount 3.0\nmean 2.0\nstd 1.0\nmin 1.0\n25% 1.5\n50% 2.0\n75% 2.5\nmax 3.0" | |
}, | |
"metadata": {}, | |
"status": "ok" | |
} | |
} | |
] | |
}, | |
"source": [ | |
"And now you can find a pandas dataframe here: \n", | |
"{eval}`x ` \n", | |
"It also has some intersting stats: \n", | |
"{eval}`x.describe()`\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "5077e626", | |
"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.11.2" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment