Skip to content

Commit 927de02

Browse files
ihsansecerjreback
authored andcommitted
CLN: Remove unnecessary io function returns (#26238)
1 parent 3f02e63 commit 927de02

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

pandas/core/frame.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -1396,13 +1396,12 @@ def to_gbq(self, destination_table, project_id=None, chunksize=None,
13961396
read_gbq : Read a DataFrame from Google BigQuery.
13971397
"""
13981398
from pandas.io import gbq
1399-
return gbq.to_gbq(
1400-
self, destination_table, project_id=project_id,
1401-
chunksize=chunksize, reauth=reauth, if_exists=if_exists,
1402-
auth_local_webserver=auth_local_webserver,
1403-
table_schema=table_schema, location=location,
1404-
progress_bar=progress_bar, credentials=credentials,
1405-
verbose=verbose, private_key=private_key)
1399+
gbq.to_gbq(self, destination_table, project_id=project_id,
1400+
chunksize=chunksize, reauth=reauth, if_exists=if_exists,
1401+
auth_local_webserver=auth_local_webserver,
1402+
table_schema=table_schema, location=location,
1403+
progress_bar=progress_bar, credentials=credentials,
1404+
verbose=verbose, private_key=private_key)
14061405

14071406
@classmethod
14081407
def from_records(cls, data, index=None, exclude=None, columns=None,

pandas/core/generic.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,7 @@ def to_hdf(self, path_or_buf, key, **kwargs):
24032403
>>> os.remove('data.h5')
24042404
"""
24052405
from pandas.io import pytables
2406-
return pytables.to_hdf(path_or_buf, key, self, **kwargs)
2406+
pytables.to_hdf(path_or_buf, key, self, **kwargs)
24072407

24082408
def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):
24092409
"""
@@ -2615,8 +2615,7 @@ def to_pickle(self, path, compression='infer',
26152615
>>> os.remove("./dummy.pkl")
26162616
"""
26172617
from pandas.io.pickle import to_pickle
2618-
return to_pickle(self, path, compression=compression,
2619-
protocol=protocol)
2618+
to_pickle(self, path, compression=compression, protocol=protocol)
26202619

26212620
def to_clipboard(self, excel=True, sep=None, **kwargs):
26222621
r"""

pandas/io/gbq.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ def to_gbq(dataframe, destination_table, project_id=None, chunksize=None,
172172
table_schema=None, location=None, progress_bar=True,
173173
credentials=None, verbose=None, private_key=None):
174174
pandas_gbq = _try_import()
175-
return pandas_gbq.to_gbq(
176-
dataframe, destination_table, project_id=project_id,
177-
chunksize=chunksize, reauth=reauth, if_exists=if_exists,
178-
auth_local_webserver=auth_local_webserver, table_schema=table_schema,
179-
location=location, progress_bar=progress_bar,
180-
credentials=credentials, verbose=verbose, private_key=private_key)
175+
pandas_gbq.to_gbq(dataframe, destination_table, project_id=project_id,
176+
chunksize=chunksize, reauth=reauth, if_exists=if_exists,
177+
auth_local_webserver=auth_local_webserver,
178+
table_schema=table_schema, location=location,
179+
progress_bar=progress_bar, credentials=credentials,
180+
verbose=verbose, private_key=private_key)

0 commit comments

Comments
 (0)