Skip to content

Commit

Permalink
plain stats encoding (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant committed Nov 16, 2016
1 parent a7433eb commit 370f9ec
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fastparquet/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,8 @@ def write_column(f, data, selement, encoding='PLAIN', compression=None):
bdata = definition_data + repetition_data + encode[encoding](data, selement)
try:
max, min = data.max(), data.min()
if encoding == "DELTA_BINARY_PACKED":
encode2 = "PLAIN"
else:
encode2 = encoding
max = encode[encode2](pd.Series([max], dtype=data.dtype), selement)
min = encode[encode2](pd.Series([min], dtype=data.dtype), selement)
max = encode['PLAIN'](pd.Series([max], dtype=data.dtype), selement)
min = encode['PLAIN'](pd.Series([min], dtype=data.dtype), selement)
except TypeError:
max, min = None, None

Expand Down

0 comments on commit 370f9ec

Please sign in to comment.