Fix deprecations for pandas DataFrame
Open
@xoolive is already working on this.
Since Oct 4, 2025.
bug
- Dominant language
- Python
- Stars
- 513
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
tests/test_datasets.py::test_scat
tests/test_datasets.py::test_scat_waypoints
/home/runner/work/traffic/traffic/src/traffic/data/datasets/scat.py:197: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
self.flight_plans = pd.concat(flight_plans)
tests/test_datasets.py::test_scat
tests/test_datasets.py::test_scat_waypoints
/home/runner/work/traffic/traffic/src/traffic/data/datasets/scat.py:198: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
self.clearances = pd.concat(clearances)
tests/test_filter.py::test_ekf
/home/runner/work/traffic/traffic/src/traffic/algorithms/filters/ekf.py:38: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
dt = (timestamps[i] - timestamps[i - 1]).total_seconds()
tests/test_filter.py::test_ekf
/home/runner/work/traffic/traffic/src/traffic/algorithms/filters/ekf.py:58: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
if abs(nu[j]) > abs(reject_sigma * std_devs[j]):
tests/test_flight.py::test_agg_time
/home/runner/work/traffic/traffic/src/traffic/core/flight.py:1614: FutureWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.
.apply(lambda df: fun(self.__class__(df)))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.