Answers for "how to define a dataframe in python with column name"

1

how to define a dataframe in python with column name

column_names = ["a", "b", "c"]

df = pd.DataFrame(columns = column_names)
Posted by: Guest on April-26-2022
-1

Making Dataframe with named column

df = pd.DataFrame(data, columns = ['Name', 'Age'])
Posted by: Guest on September-21-2021

Code answers related to "how to define a dataframe in python with column name"

Python Answers by Framework

Browse Popular Code Answers by Language