Skip to content

Commit

Permalink
deploy: ebbc0ce
Browse files Browse the repository at this point in the history
  • Loading branch information
pryn-kb committed Sep 3, 2024
1 parent 30fa63d commit 8ac2ac5
Show file tree
Hide file tree
Showing 60 changed files with 368 additions and 10,657 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion _sources/docs/101/part2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"source": [
"Python for Absolute Beginners, Part 2.\n",
"\n",
"In this second part of our introduction to Python, you will build on the foundations from Part 1 to start writing short scripts. By the end of this course, you will even have the opportunity to create a small game!\n",
"In this second part of our introduction to Python, you will build on the foundations from [Part 1](../101/part1) to start writing short scripts. By the end of this course, you will even have the opportunity to create a small game!\n",
"\n",
"To participate in this course, it is essential that you either have completed Part 1 or possess an understanding of the topics covered there. This will ensure that you are well prepared to take full advantage of the more advanced concepts in Part 2."
]
Expand Down
4 changes: 2 additions & 2 deletions _sources/docs/howto/jupyterlab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"source": [
"This resource is designed to help you navigate and make the most of JupyterLab, whether you are just getting started or looking to enhance your workflow.\n",
"\n",
"In the \"Open and Navigate JupyterLab\" section, you will find essential tips on opening files, managing your workspace, and saving your work effectively.\n",
"In the [Open and Navigate JupyterLab](jupyterlab_1) section, you will find essential tips on opening files, managing your workspace, and saving your work effectively.\n",
"\n",
"The \"Code in JupyterLab\" section provides a deeper dive into running code cells, understanding the different modes, and efficiently organizing your notebook through creating, deleting, and moving cells. You will also learn about useful features like auto-closing brackets and managing kernels.\n",
"The [Code in JupyterLab](jupyterlab_2) section provides a deeper dive into running code cells, understanding the different modes, and efficiently organizing your notebook through creating, deleting, and moving cells. You will also learn about useful features like auto-closing brackets and managing kernels.\n",
"\n",
"For more in-depth information, visit the official [JupyterLab User Guide](https://jupyterlab.readthedocs.io/en/stable/user/)."
]
Expand Down
21 changes: 20 additions & 1 deletion _sources/docs/pandas/01_pandas_dataframe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@
"# Pandas `DataFrame`"
]
},
{
"cell_type": "markdown",
"id": "64953a72-9964-4d8c-b420-b3f97dad7679",
"metadata": {},
"source": [
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* What is a Pandas `DataFrame`?\n",
"* How is a `DataFrame` used to manage and manipulate data?\n",
"\n",
"Objectives:\n",
"* Understand the structure and purpose of a `DataFrame`.\n",
"* Create a `DataFrame` from lists.\n",
"* Perform basic `DataFrame` manipulations, such as renaming columns and transposing data.\n",
"* Understand the structure and purpose of a Pandas `Series`.\n",
"* Append `Series` as columns to an existing `DataFrame` and create new columns based on existing data."
]
},
{
"cell_type": "markdown",
"id": "64495ea9-3773-4c8b-a699-fc8bf1b2cf55",
Expand Down Expand Up @@ -1288,7 +1307,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
20 changes: 19 additions & 1 deletion _sources/docs/pandas/02_Pandas_tabular_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"# Read and Write Tabular Data"
]
},
{
"cell_type": "markdown",
"id": "9834ddce-1a75-469b-b7b2-c1b47bb174ad",
"metadata": {},
"source": [
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* How can we read, inspect, and export tabular data using Pandas?\n",
"\n",
"Objectives:\n",
"* Load tabular data from a spreadsheet into a `DataFrame`.\n",
"* Inspect the structure and contents of your dataset.\n",
"* Identify missing data within your dataset.\n",
"* Apply filters to extract specific subsets of data based on conditions.\n",
"* Save and export your dataset to various file formats."
]
},
{
"cell_type": "markdown",
"id": "fd7930e4-d137-499b-afed-b112cc278c67",
Expand Down Expand Up @@ -2341,7 +2359,7 @@
"source": [
"## Key points\n",
"\n",
"* Getting data in to pandas from many different file formats or data sources is supported by `read_*` functions.\n",
"* Reading data into Pandas from many different file formats or data sources is supported by `read_*` functions.\n",
"\n",
"* The `head()`, `tail()`, and `info()` methods are convenient for a first check.\n",
"\n",
Expand Down
20 changes: 19 additions & 1 deletion _sources/docs/pandas/02_pandas_tabular_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
"# Read and Write Tabular Data"
]
},
{
"cell_type": "markdown",
"id": "9834ddce-1a75-469b-b7b2-c1b47bb174ad",
"metadata": {},
"source": [
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* How can we read, inspect, and export tabular data using Pandas?\n",
"\n",
"Objectives:\n",
"* Load tabular data from a spreadsheet into a `DataFrame`.\n",
"* Inspect the structure and contents of your dataset.\n",
"* Identify missing data within your dataset.\n",
"* Apply filters to extract specific subsets of data based on conditions.\n",
"* Save and export your dataset to various file formats."
]
},
{
"cell_type": "markdown",
"id": "fd7930e4-d137-499b-afed-b112cc278c67",
Expand Down Expand Up @@ -2341,7 +2359,7 @@
"source": [
"## Key points\n",
"\n",
"* Getting data in to pandas from many different file formats or data sources is supported by `read_*` functions.\n",
"* Reading data into Pandas from many different file formats or data sources is supported by `read_*` functions.\n",
"\n",
"* The `head()`, `tail()`, and `info()` methods are convenient for a first check.\n",
"\n",
Expand Down
46 changes: 22 additions & 24 deletions _sources/docs/pandas/03_Pandas_subsets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@
"# Subsets"
]
},
{
"cell_type": "markdown",
"id": "f9ddee47-e8ab-4f68-b283-2e6c71b6aa52",
"metadata": {},
"source": [
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* How can we select and filter specific columns and rows in a `DataFrame`?\n",
"\n",
"Objectives:\n",
"* Select specific columns from a `DataFrame` using square bracket notation.\n",
"* Use the loc property for label-based indexing in a DataFrame.\n",
"* Use the iloc property for position-based indexing in a DataFrame.\n",
"* Filter rows based on the presence or absence of missing values.\n",
"* Understand the differences and complementary uses of loc and iloc. "
]
},
{
"cell_type": "markdown",
"id": "b90cc6fd-2f57-4f94-bff7-cf6b0aace5f5",
Expand Down Expand Up @@ -2770,22 +2788,6 @@
"titanic.iloc[9:25, 2:6].loc[titanic['Age'] > 35]"
]
},
{
"cell_type": "markdown",
"id": "066d02a8-dfb6-4fbc-913a-c2dab3644ec9",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"## Summary\n",
"\n",
"Using `.loc[]` and `.iloc[]` allows you to write clearer, more precise code for selecting and manipulating data in Pandas. Whether you are filtering rows based on complex conditions or selecting specific rows and columns simultaneously, these tools offer the flexibility and reliability you need for more advanced data manipulation tasks."
]
},
{
"cell_type": "markdown",
"id": "d06d4633-9550-4978-a275-0d6920770a9c",
Expand Down Expand Up @@ -2813,17 +2815,13 @@
"source": [
"## Key points\n",
"\n",
"* **Selecting columns**:\n",
" * Access a single column or multiple columns from a DataFrame using square bracket notation (`[]`).\n",
"* Access a single column or multiple columns from a `DataFrame` using square bracket notation (`[]`).\n",
"\n",
"* **Selecting subsets of data**:\n",
" * Use `.loc[]` for label-based indexing and `.iloc[]` for position-based indexing to select specific rows and columns.\n",
"* Use label-based indexing (`.loc[]`) and position-based indexing (`.iloc[]`) to select specific rows and columns.\n",
"\n",
"* **Slicing**:\n",
" * Slicing with `.loc[]` is inclusive, while slicing with `.iloc[]` is exclusive.\n",
"* Slicing with `.loc[]` is inclusive, while slicing with `.iloc[]` is exclusive.\n",
"\n",
"* **Filtering data**:\n",
" * Filter rows based on conditions using `.loc[]` and `.iloc[]`, and apply additional conditions or select specific columns within the same operation."
"* Filter rows based on conditions and apply additional conditions or select specific columns within the same operation."
]
},
{
Expand Down
46 changes: 22 additions & 24 deletions _sources/docs/pandas/03_pandas_subsets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@
"# Subsets"
]
},
{
"cell_type": "markdown",
"id": "f9ddee47-e8ab-4f68-b283-2e6c71b6aa52",
"metadata": {},
"source": [
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* How can we select and filter specific columns and rows in a `DataFrame`?\n",
"\n",
"Objectives:\n",
"* Select specific columns from a `DataFrame` using square bracket notation.\n",
"* Use the loc property for label-based indexing in a DataFrame.\n",
"* Use the iloc property for position-based indexing in a DataFrame.\n",
"* Filter rows based on the presence or absence of missing values.\n",
"* Understand the differences and complementary uses of loc and iloc. "
]
},
{
"cell_type": "markdown",
"id": "b90cc6fd-2f57-4f94-bff7-cf6b0aace5f5",
Expand Down Expand Up @@ -2770,22 +2788,6 @@
"titanic.iloc[9:25, 2:6].loc[titanic['Age'] > 35]"
]
},
{
"cell_type": "markdown",
"id": "066d02a8-dfb6-4fbc-913a-c2dab3644ec9",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"## Summary\n",
"\n",
"Using `.loc[]` and `.iloc[]` allows you to write clearer, more precise code for selecting and manipulating data in Pandas. Whether you are filtering rows based on complex conditions or selecting specific rows and columns simultaneously, these tools offer the flexibility and reliability you need for more advanced data manipulation tasks."
]
},
{
"cell_type": "markdown",
"id": "d06d4633-9550-4978-a275-0d6920770a9c",
Expand Down Expand Up @@ -2813,17 +2815,13 @@
"source": [
"## Key points\n",
"\n",
"* **Selecting columns**:\n",
" * Access a single column or multiple columns from a DataFrame using square bracket notation (`[]`).\n",
"* Access a single column or multiple columns from a `DataFrame` using square bracket notation (`[]`).\n",
"\n",
"* **Selecting subsets of data**:\n",
" * Use `.loc[]` for label-based indexing and `.iloc[]` for position-based indexing to select specific rows and columns.\n",
"* Use label-based indexing (`.loc[]`) and position-based indexing (`.iloc[]`) to select specific rows and columns.\n",
"\n",
"* **Slicing**:\n",
" * Slicing with `.loc[]` is inclusive, while slicing with `.iloc[]` is exclusive.\n",
"* Slicing with `.loc[]` is inclusive, while slicing with `.iloc[]` is exclusive.\n",
"\n",
"* **Filtering data**:\n",
" * Filter rows based on conditions using `.loc[]` and `.iloc[]`, and apply additional conditions or select specific columns within the same operation."
"* Filter rows based on conditions and apply additional conditions or select specific columns within the same operation."
]
},
{
Expand Down
18 changes: 17 additions & 1 deletion _sources/docs/pandas/04_pandas_summary_statistics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
"# Summary Statistics"
]
},
{
"cell_type": "markdown",
"id": "8f4c0f2a-e065-494f-acfe-f343801f9a69",
"metadata": {},
"source": [
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* How can we calculate and analyse summary statistics using Pandas?\n",
"\n",
"Objectives:\n",
"* Use built-in methods for descriptive statistics.\n",
"* Use the split-apply-combind pattern to perform descriptive statistics on groupings of data.\n",
"* Use different count methods on groupings of data."
]
},
{
"cell_type": "markdown",
"id": "9ffbfee4-8515-4ccf-9b92-77cc164cb850",
Expand Down Expand Up @@ -479,7 +495,7 @@
"id": "18813351-2fb9-4201-b69a-9fdd61adef72",
"metadata": {},
"source": [
"Multiple aggregating statistics can easily be calculated for one or more columns at the same time. For this we can use the `describe()` function."
"Multiple descriptive statistics can easily be calculated for one or more columns at the same time. For this we can use the `describe()` method."
]
},
{
Expand Down
43 changes: 36 additions & 7 deletions _sources/docs/pandas/05_pandas_plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,32 @@
"cells": [
{
"cell_type": "markdown",
"id": "6eed7165-9b38-4ea1-bf39-85e434a39462",
"id": "1f4c686a-1df8-44cb-bf7e-be6c87f6bfd6",
"metadata": {},
"source": [
"# Basic Visualisations in Pandas"
]
},
{
"cell_type": "markdown",
"id": "e0108d8c-df58-4f7e-975e-269bac5ef530",
"metadata": {},
"source": [
"# Basic Plotting in Pandas\n",
"```{admonition} Learning Objectives\n",
"\n",
"Questions:\n",
"* How to get started with plotting using Pandas.\n",
"\n",
"Objectives:\n",
"* Understand the basics of the `.plot()` syntax.\n",
"* Visualise your data with various plots."
]
},
{
"cell_type": "markdown",
"id": "6eed7165-9b38-4ea1-bf39-85e434a39462",
"metadata": {},
"source": [
"![Plotting in Pandas](images/05_plot_overview.png)"
]
},
Expand Down Expand Up @@ -307,24 +328,32 @@
},
{
"cell_type": "markdown",
"id": "2565eb52-2f21-4432-89a5-f08c68c79521",
"id": "27a1b00b-8b3d-4e47-8df6-bb2627ea8159",
"metadata": {},
"source": [
"## Conclusion"
"___"
]
},
{
"cell_type": "markdown",
"id": "ebe56032-82ac-4696-b72b-57d51cb9defb",
"id": "05400eb0-7301-4859-ba8b-2e312d592dd6",
"metadata": {},
"source": [
"While plotting with Pandas is often done using the `matplotlib` library, Pandas' `.plot()` method is a versatile tool for quickly generating a wide range of plots directly from your data. Whether you're creating simple line plots, bar charts, or more complex visualisations like scatter plots and histograms, `.plot()` provides an efficient interface for data visualisation. This method simplifies the process of plotting while offering a good level of customisation, making it suitable for both quick exploratory analysis and more polished, presentation-ready graphics."
"## Key points\n",
"\n",
"* Pandas' `.plot()` method is a tool for quickly generating a wide range of plots directly from your data.\n",
"\n",
"* It supports various types of plots, including line plots, bar charts, scatter plots, and histograms.\n",
"\n",
"* The `.plot()` method allows for both quick exploratory analysis and more polished, presentation-ready graphics.\n",
"\n",
"* For more elaborate and detailed plotting, consider using the `matplotlib` library directly."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ec3c1a92-5c86-4150-9983-4c6f810c8768",
"id": "4de33b87-d363-4a2b-9414-9e5dd91de951",
"metadata": {},
"outputs": [],
"source": []
Expand Down
Loading

0 comments on commit 8ac2ac5

Please sign in to comment.