Skip to content

Commit

Permalink
Update df creation in helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahamel authored and michaelosthege committed Jun 18, 2024
1 parent 8466a44 commit c127211
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bletl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
NoMeasurementData,
)

__version__ = "1.4.1"
__version__ = "1.4.2"
3 changes: 2 additions & 1 deletion bletl/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains helper functions that do not depend on other modules within this package."""

import datetime
import enum
import pathlib
Expand Down Expand Up @@ -35,7 +36,7 @@ def __to_typed_cols__(
dfout[ncol] = None
elif issubclass(typ, enum.Enum):
# Enum types are kept as object-series
dfout[ncol] = dfin[ocol].apply(lambda x: typ(x), convert_dtype=False)
dfout[ncol] = pandas.Series([typ(x) for x in dfin[ocol]], name=ncol, dtype=object)
else:
dfout[ncol] = dfin[ocol].astype(typ)
return dfout
Expand Down

0 comments on commit c127211

Please sign in to comment.