Skip to content

Commit 73573d8

Browse files
committed
fixup
1 parent a1fd2dd commit 73573d8

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

pandas/tests/dtypes/test_generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
class TestABCClasses:
1919
tuples = [[1, 2, 2], ["red", "blue", "red"]]
2020
multi_index = pd.MultiIndex.from_arrays(tuples, names=("number", "color"))
21-
datetime_index = pd.to_datetime(["2000/1/1", "2010/1/1"])
21+
datetime_index = pd.to_datetime(["1/1/2000", "1/1/2010"])
2222
timedelta_index = pd.to_timedelta(np.arange(5), unit="s")
23-
period_index = pd.period_range("2000/1/1", "2010/1/1/", freq="M")
23+
period_index = pd.period_range("1/1/2000", "1/1/2010", freq="M")
2424
categorical = pd.Categorical([1, 2, 3], categories=[2, 3, 1])
2525
categorical_df = pd.DataFrame({"values": [1, 2, 3]}, index=categorical)
2626
df = pd.DataFrame({"names": ["a", "b", "c"]}, index=multi_index)

pandas/tests/groupby/test_quantile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
([np.nan, 4.0, np.nan, 2.0, np.nan], [np.nan, 4.0, np.nan, 2.0, np.nan]),
2929
# Timestamps
3030
(
31-
list(pd.date_range("1/1/18", freq="D", periods=5)),
32-
list(pd.date_range("1/1/18", freq="D", periods=5))[::-1],
31+
list(pd.date_range("1/1/2018", freq="D", periods=5)),
32+
list(pd.date_range("1/1/2018", freq="D", periods=5))[::-1],
3333
),
3434
# All NA
3535
([np.nan] * 5, [np.nan] * 5),

pandas/tests/io/parser/test_parse_dates.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def test_nat_parse(all_parsers):
773773
# see gh-3062
774774
parser = all_parsers
775775
df = DataFrame(
776-
dict({"A": np.arange(10, dtype="float64"), "B": Timestamp("20010101")})
776+
dict({"A": np.arange(10, dtype="float64"), "B": Timestamp("2001-01-01")})
777777
)
778778
df.iloc[3:6, :] = np.nan
779779

@@ -1604,7 +1604,9 @@ def date_parser(dt, time):
16041604
arr = [datetime.combine(d, t) for d, t in zip(dt, time)]
16051605
return np.array(arr, dtype="datetime64[s]")
16061606

1607-
result = parser.read_csv(
1607+
result = parser.read_csv_with_warnings(
1608+
UserWarning,
1609+
"without a format specified",
16081610
StringIO(data),
16091611
date_parser=date_parser,
16101612
parse_dates={"datetime": ["date", "time"]},
@@ -1626,12 +1628,7 @@ def test_parse_date_column_with_empty_string(all_parsers):
16261628
# see gh-6428
16271629
parser = all_parsers
16281630
data = "case,opdate\n7,10/18/2006\n7,10/18/2008\n621, "
1629-
result = parser.read_csv_check_warnings(
1630-
UserWarning,
1631-
"Parsing datetime strings without a format specified",
1632-
StringIO(data),
1633-
parse_dates=["opdate"],
1634-
)
1631+
result = parser.read_csv(StringIO(data), parse_dates=["opdate"])
16351632

16361633
expected_data = [[7, "10/18/2006"], [7, "10/18/2008"], [621, " "]]
16371634
expected = DataFrame(expected_data, columns=["case", "opdate"])

0 commit comments

Comments
 (0)