8000 DEPR: Bunch o deprecation removals part 2 by jreback · Pull Request #10892 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DEPR: Bunch o deprecation removals part 2 #10892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 24, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
DEPR: Remove the table keyword in HDFStore.put/append, in favor of us…
…ing format= #4645
  • Loading branch information
jreback committed Aug 24, 2015
commit 69271b3350d1f6a5a4f2f919fbc39599e3b5f3a0
7 changes: 7 additions & 0 deletions doc/source/whatsnew/v0.17.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,13 @@ Removal of prior version deprecations/changes

df.add(df.A,axis='index')




- Remove the ``table`` keyword in ``HDFStore.put/append``, in favor of using ``format=`` (:issue:`4645`)



.. _whatsnew_0170.performance:

Performance Improvements
Expand Down
11 changes: 0 additions & 11 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,17 +1117,6 @@ def _validate_format(self, format, kwargs):
""" validate / deprecate formats; return the new kwargs """
kwargs = kwargs.copy()

# table arg
table = kwargs.pop('table', None)

if table is not None:
warnings.warn(format_deprecate_doc, FutureWarning)

if table:
format = 'table'
else:
format = 'fixed'

# validate
try:
kwargs['format'] = _FORMAT_MAP[format.lower()]
Expand Down
16 changes: 8 additions & 8 deletions pandas/io/tests/test_pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def test_append_all_nans(self):
store.append('df2', df[10:], dropna=False)
tm.assert_frame_equal(store['df2'], df)

# Test to make sure defaults are to not drop.
# Test to make sure defaults are to not drop.
# Corresponding to Issue 9382
df_with_missing = DataFrame({'col1':[0, np.nan, 2], 'col2':[1, np.nan, np.nan]})

Expand All @@ -1059,7 +1059,7 @@ def test_append_all_nans(self):

with ensure_clean_path(self.path) as path:
panel_with_missing.to_hdf(path, 'panel_with_missing', format='table')
reloaded_panel = read_hdf(path, 'panel_with_missing')
reloaded_panel = read_hdf(path, 'panel_with_missing')
tm.assert_panel_equal(panel_with_missing, reloaded_panel)

def test_append_frame_column_oriented(self):
Expand Down Expand Up @@ -2440,9 +2440,9 @@ def test_terms(self):
p4d = tm.makePanel4D()
wpneg = Panel.fromDict({-1: tm.makeDataFrame(), 0: tm.makeDataFrame(),
1: tm.makeDataFrame()})
store.put('wp', wp, table=True)
store.put('p4d', p4d, table=True)
store.put('wpneg', wpneg, table=True)
store.put('wp', wp, format='table')
store.put('p4d', p4d, format='table')
store.put('wpneg', wpneg, format='table')

# panel
result = store.select('wp', [Term(
Expand Down Expand Up @@ -2607,7 +2607,7 @@ def test_same_name_scoping(self):

import pandas as pd
df = DataFrame(np.random.randn(20, 2),index=pd.date_range('20130101',periods=20))
store.put('df', df, table=True)
store.put('df', df, format='table')
expected = df[df.index>pd.Timestamp('20130105')]

import datetime
Expand Down Expand Up @@ -3608,7 +3608,7 @@ def test_frame_select_complex(self):
df.loc[df.index[0:4],'string'] = 'bar'

with ensure_clean_store(self.path) as store:
store.put('df', df, table=True, data_columns=['string'])
store.put('df', df, format='table', data_columns=['string'])

# empty
result = store.select('df', 'index>df.index[3] & string="bar"')
Expand Down Expand Up @@ -3717,7 +3717,7 @@ def test_invalid_filtering(self):
df = tm.makeTimeDataFrame()

with ensure_clean_store(self.path) as store:
store.put('df', df, table=True)
store.put('df', df, format='table')

# not implemented
self.assertRaises(NotImplementedError, store.select, 'df', "columns=['A'] | columns=['B']")
Expand Down
0