diff --git a/episodes/14-looping-data-sets.md b/episodes/14-looping-data-sets.md index ec19be367..476216d79 100644 --- a/episodes/14-looping-data-sets.md +++ b/episodes/14-looping-data-sets.md @@ -195,7 +195,7 @@ import pandas as pd import matplotlib.pyplot as plt fig, ax = plt.subplots(1,1) for filename in glob.glob('data/gapminder_gdp*.csv'): - dataframe = pd.read_csv(filename) + dataframe = pd.read_csv(filename, index_col="country") # extract from the filename, expected to be in the format 'data/gapminder_gdp_.csv'. # we will split the string using the split method and `_` as our separator, # retrieve the last string in the list that split returns (`.csv`),