toolbox-utils 5.4.0__tar.gz → 5.5.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/CHANGELOG.md +36 -0
  2. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/PKG-INFO +1 -1
  3. toolbox_utils-5.5.5/VERSION +1 -0
  4. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/pyproject.toml +1 -1
  5. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/readers/wdm.py +4 -2
  6. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/tsutils.py +62 -54
  7. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/utils.py +1 -1
  8. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils.egg-info/PKG-INFO +1 -1
  9. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_read.py +0 -1
  10. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_wdm.py +18 -17
  11. toolbox_utils-5.4.0/VERSION +0 -1
  12. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.deepsource.toml +0 -0
  13. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.github/dependabot.yml +0 -0
  14. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.github/workflows/clean-workflow-runs.yml +0 -0
  15. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.github/workflows/pypi-package.yml +0 -0
  16. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.github/workflows/tests.yml +0 -0
  17. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.gitignore +0 -0
  18. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.pre-commit-config.yaml +0 -0
  19. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/.sourcery.yaml +0 -0
  20. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/AUTHORS.rst +0 -0
  21. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/BADGES.rst +0 -0
  22. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/CONTRIBUTING.rst +0 -0
  23. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/LICENSE.txt +0 -0
  24. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/README.rst +0 -0
  25. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/Makefile +0 -0
  26. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/authors.rst +0 -0
  27. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/conf.py +0 -0
  28. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/contributing.rst +0 -0
  29. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/index.rst +0 -0
  30. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/license.rst +0 -0
  31. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/make.bat +0 -0
  32. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/docs/readme.rst +0 -0
  33. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/setup.cfg +0 -0
  34. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/__init__.py +0 -0
  35. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/readers/__init__.py +0 -0
  36. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/readers/hbn.py +0 -0
  37. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/readers/plotgen.py +0 -0
  38. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils/readers/utils.py +0 -0
  39. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils.egg-info/SOURCES.txt +0 -0
  40. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils.egg-info/dependency_links.txt +0 -0
  41. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils.egg-info/requires.txt +0 -0
  42. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/src/toolbox_utils.egg-info/top_level.txt +0 -0
  43. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data.wdm +0 -0
  44. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_bi_daily.csv +0 -0
  45. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_bivl.hbn +0 -0
  46. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_end.bivl.csv +0 -0
  47. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_end.daily.csv +0 -0
  48. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_end.monthly.csv +0 -0
  49. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_end.yearly.csv +0 -0
  50. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_flow_stage.xlsx +0 -0
  51. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_period.bivl.csv +0 -0
  52. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_period.daily.csv +0 -0
  53. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_period.monthly.csv +0 -0
  54. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_period.yearly.csv +0 -0
  55. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_plotgen.plt +0 -0
  56. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_simple.csv +0 -0
  57. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_start.bivl.csv +0 -0
  58. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_start.daily.csv +0 -0
  59. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_start.monthly.csv +0 -0
  60. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_start.yearly.csv +0 -0
  61. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_wdm_1.csv +0 -0
  62. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_wdm_2.csv +0 -0
  63. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/data_yearly.hbn +0 -0
  64. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_asbestfreq.py +0 -0
  65. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_date_slice.py +0 -0
  66. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_dateparse.py +0 -0
  67. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_extract.py +0 -0
  68. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_hbn.py +0 -0
  69. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_make_list.py +0 -0
  70. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_period_timestamp.py +0 -0
  71. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_plotgen.py +0 -0
  72. {toolbox_utils-5.4.0 → toolbox_utils-5.5.5}/tests/test_range_to_numlist.py +0 -0
@@ -1,3 +1,39 @@
1
+ ## v5.5.5 (2026-06-11)
2
+
3
+ ### Fix
4
+
5
+ - support numpy 1.* by casting ndiff to int64
6
+
7
+ ## v5.5.4 (2026-06-10)
8
+
9
+ ### Fix
10
+
11
+ - support for pandas 3
12
+
13
+ ## v5.5.3 (2026-06-10)
14
+
15
+ ### Fix
16
+
17
+ - added interval check for monthly, quarterly, and yearly frequencies in asbestfreq
18
+
19
+ ## v5.5.2 (2026-06-10)
20
+
21
+ ### Fix
22
+
23
+ - rearranged frequency guessing in asbestfreq since an sub-daily time series all on XXXX-01-01 was thought of as a YS frequency instead of hourly
24
+
25
+ ## v5.5.1 (2026-06-10)
26
+
27
+ ### Fix
28
+
29
+ - made asbestfreq more robust
30
+
31
+ ## v5.5.0 (2026-06-09)
32
+
33
+ ### Feat
34
+
35
+ - add "rename_index" keyword "common_kwds" function
36
+
1
37
  ## v5.4.0 (2026-06-09)
2
38
 
3
39
  ### Feat
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toolbox_utils
3
- Version: 5.4.0
3
+ Version: 5.5.5
4
4
  Summary: Python toolbox for common utilities
5
5
  Author-email: Tim Cera <tim@cerazone.net>
6
6
  License: BSD-3-Clause
@@ -0,0 +1 @@
1
+ 5.5.5
@@ -61,7 +61,7 @@ github = "https://github.com/timcera/toolbox_utils"
61
61
  name = "cz_conventional_commits"
62
62
  tag_format = "v$version"
63
63
  update_changelog_on_bump = true
64
- version = "5.4.0"
64
+ version = "5.5.5"
65
65
  version_files = ["VERSION"]
66
66
 
67
67
  [tool.isort]
@@ -143,10 +143,12 @@ def wdm_extract(wdmfile, *idsn):
143
143
  tgroup = dattr["TGROUP"]
144
144
  tstep = dattr["TSSTEP"]
145
145
  tcode = dattr["TCODE"]
146
- cindex = pd.date_range(start=start, periods=len(records) + 1, freq=freq[tgroup])
146
+ cindex = pd.date_range(
147
+ start=start, periods=len(records) + 1, freq=freq[tgroup]
148
+ ).astype("datetime64[ns]")
147
149
  tindex = pd.date_range(
148
150
  start=start, end=cindex[-1], freq=str(tstep) + freq[tcode]
149
- )
151
+ ).astype("datetime64[ns]")
150
152
  counts = np.diff(np.searchsorted(tindex, cindex))
151
153
 
152
154
  # Get timeseries data
@@ -1402,6 +1402,7 @@ def common_kwds(
1402
1402
  names: Optional[Union[List[str], str]] = None,
1403
1403
  usecols: Optional[List[Union[int, str]]] = None,
1404
1404
  por: bool = False,
1405
+ rename_index: bool = True,
1405
1406
  ):
1406
1407
  """
1407
1408
  Process all common_kwds across sub-commands into single function.
@@ -1476,10 +1477,18 @@ def common_kwds(
1476
1477
 
1477
1478
  ntsd = _date_slice(ntsd, start_date=start_date, end_date=end_date, por=por)
1478
1479
 
1479
- if (
1480
- not ntsd.index.name or "Datetime" not in ntsd.index.name
1481
- ) and ntsd.index.inferred_type == "datetime64":
1482
- ntsd.index.name = "Datetime"
1480
+ if rename_index and ((not ntsd.index.name) or ("Datetime" not in ntsd.index.name)):
1481
+ ntsd.index.name = "UniqueID"
1482
+
1483
+ if isinstance(ntsd.index, pd.DatetimeIndex):
1484
+ timezone = ntsd.index.tz
1485
+ if timezone:
1486
+ ntsd.index.name = f"Datetime:{timezone}"
1487
+ else:
1488
+ ntsd.index.name = "Datetime"
1489
+
1490
+ if isinstance(ntsd.index, pd.PeriodIndex):
1491
+ ntsd.index.name = "Period"
1483
1492
 
1484
1493
  if dropna in ("any", "all"):
1485
1494
  ntsd = ntsd.dropna(axis="index", how=dropna)
@@ -1721,19 +1730,21 @@ def asbestfreq(data: DataFrame, force_freq: Optional[str] = None) -> DataFrame:
1721
1730
  if force_freq:
1722
1731
  return _replace_nan_with_na(data, freq=force_freq)
1723
1732
 
1733
+ ndata = data.dropna(how="all")
1734
+
1724
1735
  # Since pandas doesn't set data.index.freq and data.index.freqstr when
1725
1736
  # using .asfreq, this function returns that PANDAS time offset alias code
1726
1737
  # also. Not ideal at all.
1727
1738
  #
1728
1739
  # This gets most of the frequencies...
1729
- if data.index.inferred_freq:
1740
+ if ndata.index.inferred_freq:
1730
1741
  with suppress(ValueError):
1731
1742
  return _replace_nan_with_na(data, freq=data.index.inferred_freq)
1732
1743
 
1733
1744
  # pd.infer_freq would fail if given a large dataset
1734
- slic = slice(None, 999) if len(data.index) > 1000 else slice(None, None)
1745
+ slic = slice(None, 999) if len(ndata.index) > 1000 else slice(None, None)
1735
1746
  try:
1736
- infer_freq = pd.infer_freq(data.index[slic])
1747
+ infer_freq = pd.infer_freq(ndata.index[slic])
1737
1748
  except ValueError:
1738
1749
  infer_freq = None
1739
1750
  if infer_freq:
@@ -1741,8 +1752,9 @@ def asbestfreq(data: DataFrame, force_freq: Optional[str] = None) -> DataFrame:
1741
1752
 
1742
1753
  data.index = data.index.astype("datetime64[ns]")
1743
1754
  ndiff = (
1744
- data.index.astype("int64").values[1:] - data.index.astype("int64").values[:-1]
1745
- )
1755
+ ndata.index.astype("datetime64[ns]").values[1:]
1756
+ - ndata.index.astype("datetime64[ns]").values[:-1]
1757
+ ).astype("int64")
1746
1758
 
1747
1759
  if np.any(ndiff <= 0):
1748
1760
  raise ValueError(
@@ -1761,57 +1773,53 @@ def asbestfreq(data: DataFrame, force_freq: Optional[str] = None) -> DataFrame:
1761
1773
  # Use the minimum of the intervals to test a new interval.
1762
1774
  # Should work for fixed intervals.
1763
1775
  ndiff = sorted(set(ndiff))
1764
- ngcd = (
1765
- ndiff[0].astype("int64")
1766
- if len(ndiff) == 1
1767
- else reduce(np.gcd, [i.astype("int64") for i in ndiff])
1768
- )
1769
- if ngcd < 1000:
1770
- infer_freq = f"{ngcd}{pandas_offset_by_version('ns')}"
1771
- elif ngcd < 1000000:
1772
- infer_freq = f"{ngcd // 1000}{pandas_offset_by_version('us')}"
1773
- elif ngcd < 1000000000:
1774
- infer_freq = f"{ngcd // 1000000}{pandas_offset_by_version('ms')}"
1775
- elif ngcd < 60000000000:
1776
- infer_freq = f"{ngcd // 1000000000}{pandas_offset_by_version('s')}"
1777
- elif ngcd < 3600000000000:
1778
- infer_freq = f"{ngcd // 60000000000}{pandas_offset_by_version('min')}"
1779
- elif ngcd < 86400000000000:
1780
- infer_freq = f"{ngcd // 3600000000000}{pandas_offset_by_version('h')}"
1781
- elif ngcd < 604800000000000:
1782
- infer_freq = f"{ngcd // 86400000000000}D"
1783
- elif ngcd < 2419200000000000:
1784
- infer_freq = f"{ngcd // 604800000000000}W"
1785
- if np.all(data.index.dayofweek == data.index[0].dayofweek):
1786
- infer_freq = f"{infer_freq}-{_WEEKLIES[data.index[0].dayofweek]}"
1787
- else:
1788
- infer_freq = "D"
1789
- if infer_freq:
1790
- return _replace_nan_with_na(data, freq=infer_freq)
1791
-
1792
- # At this point pd.infer_freq failed probably because of missing values.
1793
- # The following algorithm would not capture things like BQ, BQS
1794
- # ...etc.
1795
- if np.all(data.index.is_month_start):
1796
- if np.all(data.index.month == data.index[0].month):
1797
- # Actually yearly with different start
1798
- infer_freq = f"YE-{_ANNUALS[data.index[0].month - 1]}"
1799
- else:
1800
- infer_freq = "MS"
1801
- elif np.all(data.index.is_month_end):
1776
+ ngcd = ndiff[0] if len(ndiff) == 1 else reduce(np.gcd, ndiff)
1777
+ ndiff = np.array(ndiff)
1778
+ # ngcd is the greatest common divisor of the intervals in nanoseconds.
1779
+ infer_freq = f"{ngcd}{pandas_offset_by_version('ns')}"
1780
+ if data.index.is_month_end.all() and all(ndiff >= 2_419_200_000_000_000):
1781
+ infer_freq = pandas_offset_by_version("ME")
1802
1782
  if np.all(data.index.month == data.index[0].month):
1803
1783
  # Actually yearly with different ends
1804
- infer_freq = f"YE-{_ANNUALS[data.index[0].month]}"
1805
- else:
1806
- infer_freq = "ME"
1807
- elif np.all(data.index.is_quarter_end):
1784
+ infer_freq = (
1785
+ f"{pandas_offset_by_version('YE')}-{_ANNUALS[data.index[0].month]}"
1786
+ )
1787
+ elif data.index.is_month_start.all() and all(ndiff >= 2_419_200_000_000_000):
1788
+ infer_freq = pandas_offset_by_version("MS")
1789
+ if np.all(data.index.month == data.index[0].month):
1790
+ # Actually yearly with different start
1791
+ infer_freq = (
1792
+ f"{pandas_offset_by_version('YS')}-{_ANNUALS[data.index[0].month - 1]}"
1793
+ )
1794
+ elif data.index.is_quarter_end.all() and all(ndiff >= 7_257_600_000_000_000):
1808
1795
  infer_freq = pandas_offset_by_version("QE")
1809
- elif np.all(data.index.is_quarter_start):
1796
+ elif data.index.is_quarter_start.all() and all(ndiff >= 7_257_600_000_000_000):
1810
1797
  infer_freq = pandas_offset_by_version("QS")
1811
- elif np.all(data.index.is_year_end):
1798
+ elif data.index.is_year_end.all() and all(ndiff >= 31_536_000_000_000_000):
1812
1799
  infer_freq = pandas_offset_by_version("YE")
1813
- elif np.all(data.index.is_year_start):
1800
+ elif data.index.is_year_start.all() and all(ndiff >= 31_536_000_000_000_000):
1814
1801
  infer_freq = pandas_offset_by_version("YS")
1802
+ elif ngcd < 1_000:
1803
+ infer_freq = f"{ngcd}{pandas_offset_by_version('ns')}"
1804
+ elif ngcd % 604_800_000_000_000 == 0:
1805
+ infer_freq = f"{ngcd // 604_800_000_000_000}W"
1806
+ if np.all(data.index.dayofweek == data.index[0].dayofweek):
1807
+ infer_freq = f"{infer_freq}-{_WEEKLIES[data.index[0].dayofweek]}"
1808
+ elif ngcd % 86_400_000_000_000 == 0:
1809
+ infer_freq = f"{ngcd // 86_400_000_000_000}D"
1810
+ elif ngcd % 3_600_000_000_000 == 0:
1811
+ infer_freq = f"{ngcd // 3_600_000_000_000}{pandas_offset_by_version('h')}"
1812
+ elif ngcd % 60_000_000_000 == 0:
1813
+ infer_freq = f"{ngcd // 60_000_000_000}{pandas_offset_by_version('min')}"
1814
+ elif ngcd % 1_000_000_000 == 0:
1815
+ infer_freq = f"{ngcd // 1_000_000_000}{pandas_offset_by_version('s')}"
1816
+ elif ngcd % 1_000_000 == 0:
1817
+ infer_freq = f"{ngcd // 1_000_000}{pandas_offset_by_version('ms')}"
1818
+ elif ngcd % 1_000 == 0:
1819
+ infer_freq = f"{ngcd // 1_000}{pandas_offset_by_version('us')}"
1820
+
1821
+ if infer_freq:
1822
+ return _replace_nan_with_na(data, freq=infer_freq)
1815
1823
 
1816
1824
  return _replace_nan_with_na(data, freq=infer_freq)
1817
1825
 
@@ -41,7 +41,7 @@ def pandas_period_by_version(new_offset: str) -> str:
41
41
  new_to_old_period = {}
42
42
  major, minor = pd.__version__.split(".")[:2]
43
43
  if (int(major) + int(minor) / 10) < 2.2:
44
- new_to_old_freq = {
44
+ new_to_old_period = {
45
45
  "Y": "A",
46
46
  "h": "H",
47
47
  "min": "T",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toolbox_utils
3
- Version: 5.4.0
3
+ Version: 5.5.5
4
4
  Summary: Python toolbox for common utilities
5
5
  Author-email: Tim Cera <tim@cerazone.net>
6
6
  License: BSD-3-Clause
@@ -11,7 +11,6 @@ class TestRead(TestCase):
11
11
  dr = pandas.date_range("2000-01-01", periods=2, freq="D")
12
12
 
13
13
  ts = pandas.Series([4.5, 4.6], index=dr)
14
- print(ts.index.dtype)
15
14
 
16
15
  self.read_direct = pandas.DataFrame(ts, columns=["Value"])
17
16
  self.read_direct.index.name = "Datetime"
@@ -21,7 +21,7 @@ class TestWDM(TestCase):
21
21
  ret2 = tsutils.asbestfreq(
22
22
  pd.read_csv("tests/data_wdm_1.csv", index_col=0, parse_dates=True)
23
23
  )
24
- assert_frame_equal(ret1, ret2, check_dtype=False)
24
+ assert_frame_equal(ret1, ret2, check_dtype=False, check_index_type=False)
25
25
 
26
26
  def test_extract2(self):
27
27
  ret1 = tsutils.common_kwds("tests/data.wdm,2")
@@ -34,14 +34,13 @@ class TestWDM(TestCase):
34
34
  def test_extract_range(self):
35
35
  ret1 = tsutils.common_kwds("tests/data.wdm,1:2")
36
36
  ret1.columns = ["data.wdm_1", "data.wdm_2"]
37
+
38
+ ret2 = pd.read_csv("tests/data_wdm_1.csv", index_col=0, parse_dates=True)
37
39
  ret2 = tsutils.asbestfreq(
38
- pd.read_csv("tests/data_wdm_1.csv", index_col=0, parse_dates=True)
39
- )
40
- ret2 = ret2.join(
41
- tsutils.asbestfreq(
42
- pd.read_csv("tests/data_wdm_2.csv", index_col=0, parse_dates=True)
43
- ),
44
- how="outer",
40
+ ret2.join(
41
+ pd.read_csv("tests/data_wdm_2.csv", index_col=0, parse_dates=True),
42
+ how="outer",
43
+ )
45
44
  )
46
45
  try:
47
46
  ret1 = ret1.replace(np.nan, pd.NA)
@@ -51,20 +50,20 @@ class TestWDM(TestCase):
51
50
  ret2 = ret2.replace(np.nan, pd.NA)
52
51
  except RecursionError:
53
52
  pass
54
- assert_frame_equal(ret1, ret2, check_dtype=False, rtol=1e-7)
53
+ assert_frame_equal(
54
+ ret1, ret2, check_dtype=False, rtol=1e-7, check_index_type=False
55
+ )
55
56
 
56
57
  def test_extract_range_plus(self):
57
58
  ret1 = tsutils.common_kwds("tests/data.wdm,1+2")
58
59
  ret1.columns = ["data.wdm_1", "data.wdm_2"]
59
60
  ret1[ret1.isnull()] = np.nan
61
+ ret2 = pd.read_csv("tests/data_wdm_1.csv", index_col=0, parse_dates=True)
60
62
  ret2 = tsutils.asbestfreq(
61
- pd.read_csv("tests/data_wdm_1.csv", index_col=0, parse_dates=True)
62
- )
63
- ret2 = ret2.join(
64
- tsutils.asbestfreq(
65
- pd.read_csv("tests/data_wdm_2.csv", index_col=0, parse_dates=True)
66
- ),
67
- how="outer",
63
+ ret2.join(
64
+ pd.read_csv("tests/data_wdm_2.csv", index_col=0, parse_dates=True),
65
+ how="outer",
66
+ )
68
67
  )
69
68
  try:
70
69
  ret1 = ret1.replace(np.nan, pd.NA)
@@ -74,4 +73,6 @@ class TestWDM(TestCase):
74
73
  ret2 = ret2.replace(np.nan, pd.NA)
75
74
  except RecursionError:
76
75
  pass
77
- assert_frame_equal(ret1, ret2, check_dtype=False, rtol=1e-7)
76
+ assert_frame_equal(
77
+ ret1, ret2, check_dtype=False, rtol=1e-7, check_index_type=False
78
+ )
@@ -1 +0,0 @@
1
- 5.4.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes