sadpandajoe commented on code in PR #43694:
URL: https://github.com/apache/superset/pull/43694#discussion_r4150480957
##########
superset/utils/pandas_postprocessing/pivot.py:
##########
@@ -302,7 +350,15 @@ def pivot( # pylint: disable=too-many-arguments # noqa:
C901
percent_mode = show_values_as
if columns and column_fill_value:
- df[columns] = df[columns].fillna(value=column_fill_value)
+ for col in columns:
+ _fill_dimension_column(df, col, column_fill_value)
+
+ # Fill NULL/NaN/NaT values in the index columns with NULL_STRING so that
+ # NULL grouping keys survive as a real "<NULL>" row in the pivot output.
+ # Mirrors the column fill above; pivot_table() drops NaN index rows
+ # regardless of the dropna= setting (dropna only governs the column axis).
+ for col in index:
+ _fill_dimension_column(df, col, NULL_STRING)
Review Comment:
A null timestamp now makes the pivot index a mixed object Index, so
Timeseries charts with resampling enabled fail with `Resample operation
requires DatetimeIndex` instead of resampling the remaining dates. Could the
null-preservation policy account for the temporal index required by the
following resample operation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]