@@ -19,7 +19,7 @@ This lecture offers some historical evidence about fluctuations in levels of agg
19
19
20
20
Let's start by installing the necessary Python packages.
21
21
22
- The ` xlrd ` package is used by ` pandas ` to perform operations on Excel files.
22
+ The ` xlrd ` package is used by ` pandas ` to perform operations on Excel files.
23
23
24
24
``` {code-cell} ipython3
25
25
!pip install xlrd
@@ -375,7 +375,7 @@ for i in range(4):
375
375
sheet_list = [process_df(df) for df in sheet_list]
376
376
df_list.append(pd.concat(sheet_list, axis=1))
377
377
378
- df_aus, df_hung , df_pol, df_germ = df_list
378
+ df_aus, df_hun , df_pol, df_deu = df_list
379
379
```
380
380
381
381
Now let's construct graphs for our four countries.
@@ -453,16 +453,16 @@ mystnb:
453
453
caption: Price index and exchange rate (Hungary)
454
454
name: pi_xrate_hungary
455
455
---
456
- m_seq = df_hung ['Notes in circulation']
457
- p_seq = df_hung ['Hungarian index of prices']
458
- e_seq = 1 / df_hung ['Cents per crown in New York']
456
+ m_seq = df_hun ['Notes in circulation']
457
+ p_seq = df_hun ['Hungarian index of prices']
458
+ e_seq = 1 / df_hun ['Cents per crown in New York']
459
459
460
460
lab = ['Hungarian index of prices',
461
461
'1/cents per Hungarian Korona (Crown)']
462
462
463
463
# Create plot
464
464
fig, ax = plt.subplots(dpi=200)
465
- _ = pe_plot(p_seq, e_seq, df_hung .index, lab, ax)
465
+ _ = pe_plot(p_seq, e_seq, df_hun .index, lab, ax)
466
466
467
467
plt.show()
468
468
```
@@ -476,7 +476,7 @@ mystnb:
476
476
---
477
477
# Plot moving average
478
478
fig, ax = plt.subplots(dpi=200)
479
- _ = pr_plot(p_seq, df_hung .index, ax)
479
+ _ = pr_plot(p_seq, df_hun .index, ax)
480
480
481
481
plt.show()
482
482
```
@@ -564,16 +564,16 @@ mystnb:
564
564
caption: Price index and exchange rate (Germany)
565
565
name: pi_xrate_germany
566
566
---
567
- p_seq = df_germ ['Price index (on basis of marks before July 1924,'
567
+ p_seq = df_deu ['Price index (on basis of marks before July 1924,'
568
568
' reichsmarks after)'].copy()
569
- e_seq = 1/df_germ ['Cents per mark']
569
+ e_seq = 1/df_deu ['Cents per mark']
570
570
571
571
lab = ['Price index',
572
572
'1/cents per mark']
573
573
574
574
# Create plot
575
575
fig, ax = plt.subplots(dpi=200)
576
- ax1 = pe_plot(p_seq, e_seq, df_germ .index, lab, ax)
576
+ ax1 = pe_plot(p_seq, e_seq, df_deu .index, lab, ax)
577
577
578
578
plt.show()
579
579
```
@@ -585,9 +585,9 @@ mystnb:
585
585
caption: Price index (adjusted) and exchange rate (Germany)
586
586
name: piadj_xrate_germany
587
587
---
588
- p_seq = df_germ ['Price index (on basis of marks before July 1924,'
588
+ p_seq = df_deu ['Price index (on basis of marks before July 1924,'
589
589
' reichsmarks after)'].copy()
590
- e_seq = 1/df_germ ['Cents per mark'].copy()
590
+ e_seq = 1/df_deu ['Cents per mark'].copy()
591
591
592
592
# Adjust the price level/exchange rate after the currency reform
593
593
p_seq[p_seq.index > '06-01-1924'] = p_seq[p_seq.index
@@ -600,7 +600,7 @@ lab = ['Price index (marks or converted to marks)',
600
600
601
601
# Create plot
602
602
fig, ax = plt.subplots(dpi=200)
603
- ax1 = pe_plot(p_seq, e_seq, df_germ .index, lab, ax)
603
+ ax1 = pe_plot(p_seq, e_seq, df_deu .index, lab, ax)
604
604
605
605
plt.show()
606
606
```
@@ -614,7 +614,7 @@ mystnb:
614
614
---
615
615
# Plot moving average
616
616
fig, ax = plt.subplots(dpi=200)
617
- _ = pr_plot(p_seq, df_germ .index, ax)
617
+ _ = pr_plot(p_seq, df_deu .index, ax)
618
618
619
619
plt.show()
620
620
```
0 commit comments