Skip to content

Commit d318f25

Browse files
committed
Fix missing import and adjust test to match GitHub description
1 parent 2692453 commit d318f25

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/core/internals/blocks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import numpy as np
99

10-
from pandas._libs import NaT, Timestamp, lib, tslib
10+
from pandas._libs import NaT, Timestamp, lib, tslib, writers
1111
import pandas._libs.internals as libinternals
1212
from pandas._libs.tslibs import Timedelta, conversion
1313
from pandas._libs.tslibs.timezones import tz_compare

pandas/tests/io/formats/test_to_csv.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,11 @@ def test_to_csv_zip_arguments(self, compression, archive_name):
556556
archived_file = os.path.basename(zp.filelist[0].filename)
557557
assert archived_file == expected_arcname
558558

559-
@pytest.mark.parametrize("df_new_type", ["int64"])
559+
@pytest.mark.parametrize("df_new_type", ["Int64"])
560560
def test_to_csv_na_rep_long_string(self, df_new_type):
561561
# see gh-25099
562-
df = pd.DataFrame([np.nan] * 3, columns=['c'], dtype=df_new_type)
562+
df = pd.DataFrame({"c": [float('nan')]*3})
563+
df = df.astype(df_new_type)
563564
expected_rows = ['c',
564565
'mynull',
565566
'mynull',

0 commit comments

Comments
 (0)