If you want to filter columns of a pandas DataFrame based on characters in their names, use DataFrame.filter
. In the example above, we only choose the columns that contain the word “cat”.
If you want to filter columns of a pandas DataFrame based on characters in their names, use DataFrame.filter
. In the example above, we only choose the columns that contain the word “cat”.