I was converting my CSV file to JSON using pandas but, I get the error from Jupyter TypeError: to_json() got an unexpected keyword argument 'indent'

Viewed 62

That's how I was converting.

    json_output = r"/home/umar/Desktop/csv/customer.json"
output = customer_df.to_json(json_output, indent = 1, orient = 'records')
1 Answers

Which pandas version are you using? Using "indent" keyword requires version >= 1.0.0

Related