Skip to content

Commit 657f115

Browse files
committed
add Pandas pivot()
1 parent cf8364b commit 657f115

File tree

5 files changed

+1764
-1
lines changed

5 files changed

+1764
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Practical Machine Learning topics for articles in my [Medium blog](https://bindi
6363
* [Accessing data in a MultiIndex DataFrame](https://bindichen.medium.com/accessing-data-in-a-multiindex-dataframe-in-pandas-569e8767201d) | [![View on Github](https://img.shields.io/badge/Github-Notebook-orange?logo=Github)](data-analysis/031-pandas-multiIndex/multiindex-selection.ipynb)
6464
* Reshaping
6565
* [Reshaping a DataFrame from wide to long format using `melt()`](https://bindichen.medium.com/reshaping-a-dataframe-using-pandas-melt-83a151ce1907) | [![View on Github](https://img.shields.io/badge/Github-Notebook-orange?logo=Github)](data-analysis/048-pandas-melt/pandas-melt.ipynb)
66-
* `pivot()` long to wide (work in progress)
66+
* [Reshaping a DataFrame from long to wide format using `pivot()`](https://bindichen.medium.com/reshaping-a-dataframe-from-long-to-wide-format-using-pivot-b099930b30ae) | [![View on Github](https://img.shields.io/badge/Github-Notebook-orange?logo=Github)](data-analysis/049-pandas-pivot/pivot.ipynb)
6767
* [Reshaping a DataFrame/Series with `stack()` and `unstack()`](https://bindichen.medium.com/reshaping-a-dataframe-with-pandas-stack-and-unstack-925dc9ce1289) | [![View on Github](https://img.shields.io/badge/Github-Notebook-orange?logo=Github)](data-analysis/067-pandas-stack/pandas-stack-unstack.ipynb)
6868
* Grouping and Summarizing
6969
* [Pandas `groupby()` for grouping data and performing operations](https://bindichen.medium.com/all-pandas-groupby-you-should-know-for-grouping-data-and-performing-operations-2a8ec1327b5) | [![View on Github](https://img.shields.io/badge/Github-Notebook-orange?logo=Github)](data-analysis/032-pandas-groupby/pandas-groupby.ipynb)
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Country,Lat,Long,Date,Cases,Recovered
2+
France,31.8257,117.2264,22/01/2020,10,1
3+
US,40.0,-100.0,22/01/2020,20,2
4+
UK,55.3781,-3.436,22/01/2020,30,3
5+
France,31.8257,117.2264,23/01/2020,40,4
6+
US,40.0,-100.0,23/01/2020,50,5
7+
UK,55.3781,-3.436,23/01/2020,60,6
8+
France,31.8257,117.2264,24/01/2020,70,7
9+
US,40.0,-100.0,24/01/2020,80,8
10+
UK,55.3781,-3.436,24/01/2020,90,9
11+
France,31.8257,117.2264,25/01/2020,100,10
12+
US,40.0,-100.0,25/01/2020,110,11
13+
UK,55.3781,-3.436,25/01/2020,120,12
14+
France,31.8257,117.2264,26/01/2020,130,13
15+
US,40.0,-100.0,26/01/2020,140,14
16+
UK,55.3781,-3.436,26/01/2020,150,15
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Country,Lat,Long,Date,Cases
2+
France,31.8257,117.2264,22/01/2020,1
3+
US,40.0,-100.0,22/01/2020,2
4+
UK,55.3781,-3.436,22/01/2020,3
5+
France,31.8257,117.2264,23/01/2020,4
6+
US,40.0,-100.0,23/01/2020,5
7+
UK,55.3781,-3.436,23/01/2020,6
8+
France,31.8257,117.2264,24/01/2020,7
9+
US,40.0,-100.0,24/01/2020,8
10+
UK,55.3781,-3.436,24/01/2020,9
11+
France,31.8257,117.2264,25/01/2020,10
12+
US,40.0,-100.0,25/01/2020,11
13+
UK,55.3781,-3.436,25/01/2020,12
14+
France,31.8257,117.2264,26/01/2020,13
15+
US,40.0,-100.0,26/01/2020,14
16+
UK,55.3781,-3.436,26/01/2020,15

0 commit comments

Comments
 (0)