Answers for "adding header list to pandas dataframe"

2

add header to table in pandas

# python 3.x
import pandas as pd
import numpy as np

df = pd.DataFrame(data=np.random.randint(0, 10, (6,4)))

df.columns=["a", "b", "c", "d"]
print(df)
Posted by: Guest on July-04-2021
-1

how to create new header of a dataframe in python

pythonCopy# python 3.x
import pandas as pd
import numpy as np

df = pd.DataFrame(data=np.random.randint(0, 10, (6,4)))

df.columns=["a", "b", "c", "d"]
print(df)
Posted by: Guest on October-31-2020

Code answers related to "adding header list to pandas dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language