BUG: Pandas 1.0.x read_json unable to convert lists with date values #33787
Labels
good first issue
IO JSON
read_json, to_json, json_normalize
Needs Tests
Unit test(s) needed to prevent regressions
Milestone
[ X] I have checked that this issue has not already been reported.
[ X] I have confirmed this bug exists on the latest version of pandas.
[ X] (optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
In pandas 0.25.x (and below), pandas read_json(path, lines=True) was able to read newline-delimited json files with blobs with entries that contained lists of all types. In Pandas 1.0.x, this same data causes a unhashable object error. The error appears to be due to lists that contain date-like objects that are converted by default with convert_dates=True.
In pandas 0.25.x, it handles the lists of dates, but does not convert those items. they are kept as strings.
Expected Output
pandas dataframe containing lists without error.
returns
Output of 1.0.3
Using pd.read_json(json_line, lines=True)
Errors vary slightly depending on context:
using pd.read_json(json_line, lines=True, convert_dates=False) returns expected output consistent with pandas 0.25.x.
[paste the output of 0.25.3 here leaving a blank line after the details tag]
The text was updated successfully, but these errors were encountered: