From 8668735cc8fc3479120937e46fae78f4813df291 Mon Sep 17 00:00:00 2001 From: Aart Goossens Date: Tue, 20 Apr 2021 19:11:34 +0200 Subject: [PATCH] Fixes integer columns for read_fit() --- docs/docs/changelog.md | 2 ++ sweat/io/fit.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 2be6c8c..a87f1bc 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -16,6 +16,8 @@ Types of changes: - `Security` in case of vulnerabilities. ## [Unreleased] - {ISO8601 date} +### Fixed +- `sweat.read_fit()` now supports integer column names. ## [0.20.2] - 2021-04-16 ### Fixed diff --git a/sweat/io/fit.py b/sweat/io/fit.py index 0ab8de2..bebb7d8 100644 --- a/sweat/io/fit.py +++ b/sweat/io/fit.py @@ -18,7 +18,7 @@ def process_location_columns(df, columns=None): if columns is None: - columns = [c for c in df.columns if c.endswith("_lat") or c.endswith("_long")] + columns = [c for c in df.columns if isinstance(c, str) and (c.endswith("_lat") or c.endswith("_long"))] else: columns = [c for c in columns if c in df.columns]