Working with columns
DataFrames
are capable of some advanced operations relating to column manipulation. So far in the chapter, what we’ve explored has utilized normal methods, properties, and indexers and simply feels like a very standard .NET approach (for lack of another description).
When we involve columns, we can do more advanced operations, including filtering, looking at distributions of data, and even mathematical operations that affect the entire column of data.
Let’s see some of the things that columns allow us to do.
Columns
The DataFrame
class has a Columns
property to match the Rows
property we discussed earlier. The Columns
property returns a DataFrameColumnCollection
, which consists of the columns in the DataFrame
.
When you load a CSV file using the LoadCsv
method, the columns it loads will be one of the following column types:
- StringDataFrameColumn: A column storing
string
values - BooleanDataFrameColumn: A column storing boolean...