Answers for "how to print data from certain columns in pandas"

2

get columns based on dtype pandas

>>df.select_dtypes(include='object').columns

Index(['C', 'D'], dtype='object')
Posted by: Guest on March-16-2021
0

python pandas return column name of a specific column

# Basic syntax:
list(df.columns)[column_number]
# This returns the column name of the column of interest
Posted by: Guest on November-05-2020

Code answers related to "how to print data from certain columns in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language