From the course: Exploring Data Science with .NET using Polyglot Notebooks & ML.NET
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Exporting DataFrames
From the course: Exploring Data Science with .NET using Polyglot Notebooks & ML.NET
Exporting DataFrames
- [Instructor] When we make changes in our DataFrames, such as adding new columns with feature engineering or filtering out existing rows or replacing or dropping missing values, this doesn't modify the underlying data. And it's not unusual to do a lot of little data cleaning operations when you're preparing your data source for analysis or machine learning experiments. After you're done data cleaning, it's a good idea to export your DataFrame to a new data file. We can do this with the SaveCsv method on DataFrame. So I'm going to call DataFrame.SaveCsv, and I'm going to pass it the DataFrame I want to save, which is my merged DataFrame. I'm going to give it the path of the file I want to write it to. So I'm going to call this training.csv because we'll use this to train our machine learning models in a few modules from now. I can also specify a separator if I want to. But it defaults to comma. And I can specify whether a header row is included or not, which defaults to true. When I…
Contents
-
-
-
-
Introducing DataFrames3m 47s
-
(Locked)
Renaming and removing columns3m 7s
-
(Locked)
Replacing missing values3m 47s
-
(Locked)
Dropping missing values1m 19s
-
(Locked)
Feature engineering5m 36s
-
(Locked)
Merging DataFrames2m 11s
-
(Locked)
Grouping data2m 16s
-
(Locked)
Filtering data2m 33s
-
(Locked)
Exporting DataFrames1m 22s
-
-
-
-
-