From 2129150a639c7e7b390e78035238c2b464dc5e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20de=20Menten?= Date: Wed, 25 Oct 2017 10:54:20 +0200 Subject: [PATCH 1/2] changed from_frame parse_header default value to False the spirit of from_frame is to modify the data as little as possible --- larray/inout/array.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/larray/inout/array.py b/larray/inout/array.py index 5fa1114a4..83d514b12 100644 --- a/larray/inout/array.py +++ b/larray/inout/array.py @@ -96,7 +96,7 @@ def from_series(s, sort_rows=False): return LArray(s.values, Axis(s.index.values, name)) -def from_frame(df, sort_rows=False, sort_columns=False, parse_header=True, unfold_last_axis_name=False, **kwargs): +def from_frame(df, sort_rows=False, sort_columns=False, parse_header=False, unfold_last_axis_name=False, **kwargs): """ Converts Pandas DataFrame into LArray. @@ -112,7 +112,7 @@ def from_frame(df, sort_rows=False, sort_columns=False, parse_header=True, unfol Defaults to False. parse_header : bool, optional Whether or not to parse columns labels. Pandas treats column labels as strings. - If True, column labels are converted into int, float or boolean when possible. Defaults to True. + If True, column labels are converted into int, float or boolean when possible. Defaults to False. unfold_last_axis_name : bool, optional Whether or not to extract the names of the last two axes by splitting the name of the last index column of the dataframe using ``\\``. Defaults to False. From 1d882e89c61623a1e2db18fc61eacd40f8383cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20de=20Menten?= Date: Fri, 10 Nov 2017 13:16:07 +0100 Subject: [PATCH 2/2] updated changelog --- doc/source/changes/version_0_27.rst.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/changes/version_0_27.rst.inc b/doc/source/changes/version_0_27.rst.inc index 82dfff88a..04378ed9b 100644 --- a/doc/source/changes/version_0_27.rst.inc +++ b/doc/source/changes/version_0_27.rst.inc @@ -19,12 +19,13 @@ Backward incompatible changes vs Axis(['a2', 'a3'], 'a') - previous behavior can be recovered through `drop_labels` or by changing labels via - `set_labels` or `set_axes`: + previous behavior can be recovered through `drop_labels` or by changing labels via `set_labels` or `set_axes`: >>> arr['a0,a1'] = arr['a2,a3'].drop_labels('a') >>> arr['a0,a1'] = arr['a2,a3'].set_labels('a', {'a2': 'a0', 'a3': 'a1'}) +* from_frame `parse_header` argument defaults to `False` instead of `True`. + New features ------------