Answers for "dataframe row to dictionary"

1

pandas row from dict

data = {'row_1': [3, 2, 1, 0], 'row_2': ['a', 'b', 'c', 'd']}
pd.DataFrame.from_dict(data, orient='index')
Posted by: Guest on January-19-2021

Code answers related to "dataframe row to dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language