File tree 1 file changed +4
-5
lines changed 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -975,21 +975,20 @@ def _read_ujson(self) -> DataFrame | Series:
975
975
"""
976
976
Read JSON using the ujson engine.
977
977
"""
978
+ obj : DataFrame | Series
978
979
if self .lines :
979
980
if self .chunksize :
980
981
obj = concat (self )
981
982
elif self .nrows :
982
983
lines = list (islice (self .data , self .nrows ))
983
984
lines_json = self ._combine_lines (lines )
984
- obj : DataFrame | Series = self ._get_object_parser (lines_json )
985
+ obj = self ._get_object_parser (lines_json )
985
986
else :
986
987
data = ensure_str (self .data )
987
988
data_lines = data .split ("\n " )
988
- obj : DataFrame | Series = self ._get_object_parser (
989
- self ._combine_lines (data_lines )
990
- )
989
+ obj = self ._get_object_parser (self ._combine_lines (data_lines ))
991
990
else :
992
- obj : DataFrame | Series = self ._get_object_parser (self .data )
991
+ obj = self ._get_object_parser (self .data )
993
992
if self .dtype_backend is not lib .no_default :
994
993
return obj .convert_dtypes (
995
994
infer_objects = False , dtype_backend = self .dtype_backend
You can’t perform that action at this time.
0 commit comments