July 2018
Beginner to intermediate
146 pages
3h 39m
English
In the previous chapter, we performed a series of data wrangling and cleaning processes on our metadata in order to convert it into a form that was more usable. To avoid having to perform these steps again, let's save this cleaned DataFrame into a CSV file. As always, doing this with pandas happens to be extremely easy.
In the knowledge recommender notebook from Chapter 4, enter the following code in the last cell:
#Convert the cleaned (non-exploded) dataframe df into a CSV file and save it in the data folder#Set parameter index to False as the index of the DataFrame has no inherent meaning.df.to_csv('../data/metadata_clean.csv', index=False)
Your data folder should now contain a new file, metadata_clean.csv ...
Read now
Unlock full access