You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an execute_mdx_dataframe is run with use_blob=True, any element named "None" will be interpreted as NaN, instead of a string "None".
This behavior is a result of lines 551/556 in 'build_dataframe_from_csv' in "Utils.py", df = pd.read_csv(StringIO(raw_csv), sep=sep, na_values=["", None], keep_default_na=False, **kwargs). If that line is changed to df = pd.read_csv(StringIO(raw_csv), sep=sep, na_values=[""], keep_default_na=False, **kwargs) (removing None from na_values), the function then behaves as expected.
I don't know why, but it seems like pandas is treating None as "None"?
To Reproduce
Have a cube where a dimension has an element named "None".
Run the function execute_mdx_dataframe, with use_blob=True and the "None" element is included in the MDXView
The element will be returned as NaN in the DataFrame.
(This might also be true for cell values that are "None", I have not tested that)
Expected behavior
Elements named "None" would be in the DataFrame as "None" instead of "NaN".
Version
TM1py 2.0.4
TM1 Server Version: 11.8.02500.3
The text was updated successfully, but these errors were encountered:
Describe the bug
When an
execute_mdx_dataframe
is run withuse_blob=True
, any element named "None" will be interpreted as NaN, instead of a string "None".This behavior is a result of lines 551/556 in 'build_dataframe_from_csv' in "Utils.py",
df = pd.read_csv(StringIO(raw_csv), sep=sep, na_values=["", None], keep_default_na=False, **kwargs)
. If that line is changed todf = pd.read_csv(StringIO(raw_csv), sep=sep, na_values=[""], keep_default_na=False, **kwargs)
(removing None from na_values), the function then behaves as expected.I don't know why, but it seems like pandas is treating None as "None"?
To Reproduce
execute_mdx_dataframe
, withuse_blob=True
and the "None" element is included in the MDXViewExpected behavior
Elements named "None" would be in the DataFrame as "None" instead of "NaN".
Version
TM1py 2.0.4
TM1 Server Version: 11.8.02500.3
The text was updated successfully, but these errors were encountered: