DEPR: Deprecate numpy argument in read_json · Issue #28512 · pandas-dev/pandas (original) (raw)
I've never really been clear on the purpose of the numpy
argument in to_json. Some digging brought me here #3876 (comment) where it is explained that this maintains some kind of sequence to elements. To illustrate the only difference I could find
pd.read_json('[{"a": 1, "b": 2}, {"b":2, "a" :1}]',numpy=False, orient='records') a b 0 1 2 1 1 2
pd.read_json('[{"a": 1, "b": 2}, {"b":2, "a" :1}]',numpy=True, orient='records') a b 0 1 2 1 2 1
I might be missing the point but I don't understand why this would be useful. Objects in JSON are by definition not ordered, so this is non-compliant and I think just plain confusing.
So I think good to deprecate unless anyone has objections.