import pandas as pd cities_lst = pd.read_table("cool_cities.csv") cities_lst.head()
I was trying to rewrite the above as a function. Unlike my code above, my function below did not return the first 5 rows, but just nothing: def cities(file_name): import pandas as pd cities_lst = pd.read_table(file_name) cities_lst.head() cities("cool_cities.csv") Why does my function not return the first 5 rows? What's the mistake I am making here? _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor