Answers for "dataframe row to dict"

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

Python Answers by Framework

Browse Popular Code Answers by Language