Select a Subset of Attributes
Learn to select the useful features from the dataset.
We'll cover the following
There are multiple ways to make a subset of selected columns in pandas. We can either drop the unnecessary columns using a list with axis=1
, or provide a list of columns we’re interested in to the subset operator for pandas, [ ]
. In the case of PySpark, the API provides a select
method that expects either multiple comma-separated columns or a list of columns as *args
.
Note:
*args
is an unspecified number of arguments to a function.
Get hands-on with 1400+ tech skills courses.