Is there any function in python similar to dput() function in R?
for a pandas.DataFrame
, print(df.to_dict())
, as shown here.
And back again with df = pandas.DataFrame.from_dict(data_as_dict)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With