Skip to content

Commit f127184

Browse files
author
Tania Allard
committed
Add more comments to the solutions
1 parent c1f4efa commit f127184

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

solutions/02_visualize-wines.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,20 @@
1212
import matplotlib.pyplot as plt
1313

1414
def create_plots(filename):
15+
"""
16+
Create plots for the analysis
17+
Args:
18+
-----
19+
filename: str
20+
Path to the filename containing the wine data
21+
22+
"""
1523
wine = pd.read_csv(filename)
1624

25+
# Calls the function that plots the distribution
1726
print(plot_distribution(wine))
1827

28+
# Calls the function that plots the scatter plot
1929
print(plot_scatter(wine))
2030

2131

@@ -61,5 +71,7 @@ def plot_scatter(wine):
6171

6272

6373
if __name__ == '__main__':
74+
# Filename is passed by the user
6475
filename = sys.argv[1]
76+
6577
create_plots(filename)

solutions/03_country-subset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def get_country(filename, country):
1616
"""
17-
Do a simple analysis per country
17+
Get a subset of the data or a given country
1818
Args:
1919
-----
2020
filename: str

0 commit comments

Comments
 (0)