Closed alespour closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
27777d1
) 90.19% compared to head (17ab3b1
) 90.40%.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #621
Proposed Changes
Handles data with missing values when querying to data frames. The query functions
query_data_frame...
have new optional parameteruse_extension_dtypes
.True
, missing values are represented aspandas.NA
and dtype of columns containing<NA>
is of corresponding nullable extension dtypes frompandas
package (ie.Int64
,Float64
,Boolean
etc). Missing value can be checked usingpandas.isna()
function.False
(default), missing values are represented asNone
, and dtype of columns with missing values is either'object'
or'float64'
when type of values is numeric. This is a standard conversion behavior of data frames, seeExample output (with data from #621):
use_extension_dtypes=True
use_extension_dtypes=False
Note: the conversion of numeric values to extension dtypes works properly with
pandas>=2.0
, so in Python 3.7 environment, where the latest available pandas is 1.3.5, dtype of columns with NA values is'object'
ie. same as without the use extension types. For Python 3.8+,pandas
2.x is available.Checklist
pytest tests
completes successfully