ItsMyCode: How to Fix in Python ValueError: Trailing data?
In Python ValueError: Trailing data occurs when you try to load the JSON data or file into pandas DataFrame, and the data is written in lines separated with newline characters
8.3k
By Amol Rathi
In Python ValueError: Trailing data occurs when you try to load the JSON data or file into pandas DataFrame, and the data is written in lines separated with newline characters such as ‘n’.
Typically, we import data from the JSON files, and there are higher chances that JSON data contains newline characters.
Let’s take a simple example to reproduce this error. We have a JSON file of employees, and the address property in the JSON has ‘n’