Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Nov 11, 2020
1 parent 45bbed3 commit d284eea
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions python/cudf/cudf/_fuzz_testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def get_avro_schema(df):


def get_orc_schema(df):
ordered_dict = OrderedDict((col_name, col_dtype) for col_name, col_dtype in df.dtypes.items())
ordered_dict = OrderedDict(
(col_name, col_dtype) for col_name, col_dtype in df.dtypes.items()
)

schema = pyorc.Struct(**ordered_dict)
return schema
Expand Down Expand Up @@ -236,7 +238,10 @@ def _null_to_None(value):
]
)

tuple_list = [tuple(map(_null_to_None, tup)) if has_nulls_or_nullable_dtype else tup for tup in df.itertuples(index=False, name=None)]
tuple_list = [
tuple(map(_null_to_None, tup)) if has_nulls_or_nullable_dtype else tup
for tup in df.itertuples(index=False, name=None)
]

return tuple_list

Expand Down Expand Up @@ -272,7 +277,9 @@ def orc_to_pandas(file_name=None, file_io_obj=None, stripes=None):
reader, columns=reader.schema.fields.keys()
)
else:
records = [record for i in stripes for record in list(reader.read_stripe(i))]
records = [
record for i in stripes for record in list(reader.read_stripe(i))
]
df = pd.DataFrame.from_records(
records, columns=reader.schema.fields.keys()
)
Expand Down

0 comments on commit d284eea

Please sign in to comment.