Skip to content

Commit cf5b62e

Browse files
committed
Remove comments and space after GH
1 parent eadf68e commit cf5b62e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

pandas/io/formats/csvs.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def save(self):
134134
"""
135135
Create the writer & save
136136
"""
137-
# GH 21227 internal compression is not used when file-like passed.
137+
# GH21227 internal compression is not used when file-like passed.
138138
if self.compression and hasattr(self.path_or_buf, 'write'):
139139
msg = ("compression has no effect when passing file-like "
140140
"object as input.")
@@ -148,7 +148,7 @@ def save(self):
148148
if is_zip:
149149
# zipfile doesn't support writing string to archive. uses string
150150
# buffer to receive csv writing and dump into zip compression
151-
# file handle. GH 21241, 21118
151+
# file handle. GH21241, GH21118
152152
f = StringIO()
153153
close = False
154154
elif hasattr(self.path_or_buf, 'write'):
@@ -176,7 +176,7 @@ def save(self):
176176

177177
finally:
178178
if is_zip:
179-
# GH 17778 handles zip compression separately.
179+
# GH17778 handles zip compression separately.
180180
buf = f.getvalue()
181181
if hasattr(self.path_or_buf, 'write'):
182182
self.path_or_buf.write(buf)

pandas/tests/io/test_compression.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def test_compression_size_fh(obj, method, compression_only):
5353
])
5454
def test_dataframe_compression_defaults_to_infer(
5555
write_method, write_kwargs, read_method, compression_only):
56-
# Test that DataFrame.to_* methods default to inferring compression from
57-
# paths. GH 22004
56+
# GH22004
5857
input = pd.DataFrame([[1.0, 0, -4], [3.4, 5, 2]], columns=['X', 'Y', 'Z'])
5958
extension = icom._compression_to_extension[compression_only]
6059
with tm.ensure_clean('compressed' + extension) as path:
@@ -72,8 +71,7 @@ def test_dataframe_compression_defaults_to_infer(
7271
def test_series_compression_defaults_to_infer(
7372
write_method, write_kwargs, read_method, read_kwargs,
7473
compression_only):
75-
# Test that Series.to_* methods default to inferring compression from
76-
# paths. GH 22004
74+
# GH22004
7775
input = pd.Series([0, 5, -2, 10], name='X')
7876
extension = icom._compression_to_extension[compression_only]
7977
with tm.ensure_clean('compressed' + extension) as path:
@@ -84,7 +82,7 @@ def test_series_compression_defaults_to_infer(
8482

8583
def test_compression_warning(compression_only):
8684
# Assert that passing a file object to to_csv while explicitly specifying a
87-
# compression protocol triggers a RuntimeWarning, as per GH 21227.
85+
# compression protocol triggers a RuntimeWarning, as per GH21227.
8886
# Note that pytest has an issue that causes assert_produces_warning to fail
8987
# in Python 2 if the warning has occurred in previous tests
9088
# (see https://git.io/fNEBm & https://git.io/fNEBC). Hence, should this

0 commit comments

Comments
 (0)