Skip to content

Commit

Permalink
Remove comments and space after GH
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel committed Aug 1, 2018
1 parent eadf68e commit cf5b62e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pandas/io/formats/csvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def save(self):
"""
Create the writer & save
"""
# GH 21227 internal compression is not used when file-like passed.
# GH21227 internal compression is not used when file-like passed.
if self.compression and hasattr(self.path_or_buf, 'write'):
msg = ("compression has no effect when passing file-like "
"object as input.")
Expand All @@ -148,7 +148,7 @@ def save(self):
if is_zip:
# zipfile doesn't support writing string to archive. uses string
# buffer to receive csv writing and dump into zip compression
# file handle. GH 21241, 21118
# file handle. GH21241, GH21118
f = StringIO()
close = False
elif hasattr(self.path_or_buf, 'write'):
Expand Down Expand Up @@ -176,7 +176,7 @@ def save(self):

finally:
if is_zip:
# GH 17778 handles zip compression separately.
# GH17778 handles zip compression separately.
buf = f.getvalue()
if hasattr(self.path_or_buf, 'write'):
self.path_or_buf.write(buf)
Expand Down
8 changes: 3 additions & 5 deletions pandas/tests/io/test_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def test_compression_size_fh(obj, method, compression_only):
])
def test_dataframe_compression_defaults_to_infer(
write_method, write_kwargs, read_method, compression_only):
# Test that DataFrame.to_* methods default to inferring compression from
# paths. GH 22004
# GH22004
input = pd.DataFrame([[1.0, 0, -4], [3.4, 5, 2]], columns=['X', 'Y', 'Z'])
extension = icom._compression_to_extension[compression_only]
with tm.ensure_clean('compressed' + extension) as path:
Expand All @@ -72,8 +71,7 @@ def test_dataframe_compression_defaults_to_infer(
def test_series_compression_defaults_to_infer(
write_method, write_kwargs, read_method, read_kwargs,
compression_only):
# Test that Series.to_* methods default to inferring compression from
# paths. GH 22004
# GH22004
input = pd.Series([0, 5, -2, 10], name='X')
extension = icom._compression_to_extension[compression_only]
with tm.ensure_clean('compressed' + extension) as path:
Expand All @@ -84,7 +82,7 @@ def test_series_compression_defaults_to_infer(

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

0 comments on commit cf5b62e

Please sign in to comment.