@@ -137,7 +137,7 @@ def test_select(tmp_path):
137137 df = DataFrame (
138138 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
139139 columns = Index (list ("ABCD" )),
140- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
140+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
141141 )
142142 _maybe_remove (store , "df" )
143143 store .append ("df" , df )
@@ -354,7 +354,7 @@ def test_select_iterator(tmp_path):
354354 df = DataFrame (
355355 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
356356 columns = Index (list ("ABCD" )),
357- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
357+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
358358 )
359359 _maybe_remove (store , "df" )
360360 store .append ("df" , df )
@@ -379,7 +379,7 @@ def test_select_iterator(tmp_path):
379379 df = DataFrame (
380380 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
381381 columns = Index (list ("ABCD" )),
382- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
382+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
383383 )
384384 df .to_hdf (path , key = "df_non_table" )
385385
@@ -395,7 +395,7 @@ def test_select_iterator(tmp_path):
395395 df = DataFrame (
396396 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
397397 columns = Index (list ("ABCD" )),
398- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
398+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
399399 )
400400 df .to_hdf (path , key = "df" , format = "table" )
401401
@@ -413,7 +413,7 @@ def test_select_iterator(tmp_path):
413413 df1 = DataFrame (
414414 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
415415 columns = Index (list ("ABCD" )),
416- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
416+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
417417 )
418418 store .append ("df1" , df1 , data_columns = True )
419419 df2 = df1 .copy ().rename (columns = "{}_2" .format )
@@ -633,7 +633,7 @@ def test_frame_select(tmp_path, request):
633633 df = DataFrame (
634634 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
635635 columns = Index (list ("ABCD" )),
636- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
636+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
637637 )
638638
639639 path = tmp_path / "file.h22"
@@ -666,7 +666,7 @@ def test_frame_select(tmp_path, request):
666666 df = DataFrame (
667667 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
668668 columns = Index (list ("ABCD" )),
669- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
669+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
670670 )
671671 store .append ("df_time" , df )
672672 msg = "day is out of range for month: 0"
@@ -685,7 +685,7 @@ def test_frame_select_complex(tmp_path):
685685 df = DataFrame (
686686 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
687687 columns = Index (list ("ABCD" )),
688- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
688+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
689689 )
690690 df ["string" ] = "foo"
691691 df .loc [df .index [0 :4 ], "string" ] = "bar"
@@ -803,7 +803,7 @@ def test_invalid_filtering(tmp_path):
803803 df = DataFrame (
804804 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
805805 columns = Index (list ("ABCD" )),
806- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
806+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
807807 )
808808
809809 path = tmp_path / "file.h24"
@@ -827,7 +827,7 @@ def test_string_select(tmp_path):
827827 df = DataFrame (
828828 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
829829 columns = Index (list ("ABCD" )),
830- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
830+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
831831 )
832832
833833 # test string ==/!=
@@ -871,7 +871,7 @@ def test_select_as_multiple(tmp_path):
871871 df1 = DataFrame (
872872 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
873873 columns = Index (list ("ABCD" )),
874- index = date_range ("2000-01-01" , periods = 10 , freq = "B" ),
874+ index = date_range ("2000-01-01" , periods = 10 , freq = "B" , unit = "ns" ),
875875 )
876876 df2 = df1 .copy ().rename (columns = "{}_2" .format )
877877 df2 ["foo" ] = "bar"
0 commit comments