Answers for "df = pd.DataFrame(data=data, index=index, columns=columns)"

5

df = pd.DataFrame(data=data, index=index, columns=columns)

>>> d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df
   col1  col2
0     1     3
1     2     4
Posted by: Guest on September-20-2020

Code answers related to "df = pd.DataFrame(data=data, index=index, columns=columns)"

Python Answers by Framework

Browse Popular Code Answers by Language