10BC0 CLN: removed pandas.sandbox · pandas-dev/pandas@361a2b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 361a2b4

Browse files
gfyoungjreback
authored andcommitted
CLN: removed pandas.sandbox
xref #9615 Author: gfyoung <gfyoung17@gmail.com> Closes #13670 from gfyoung/sandbox-removal and squashes the following commits: 2a014aa [gfyoung] CLN: removed pandas.sandbox
1 parent b054536 commit 361a2b4

File tree

7 files changed

+11
-222
lines changed
  • 7 files changed

    +11
    -222
    lines changed

    doc/source/ecosystem.rst

    Lines changed: 6 additions & 0 deletions
    `Plotly’s <https://plot.ly/>`__ `Python API <https://plot.ly/python/>`__ enables interactive figures and web shareability. Maps, 2D, 3D, and live-streaming graphs are rendered with WebGL and `D3.js <http://d3js.org/>`__. The library supports plotting directly from a pandas DataFrame and cloud-based collaboration. Users of `matplotlib, ggplot for Python, and Seaborn <https://plot.ly/python/matplotlib-to-plotly-tutorial/>`__ can convert figures into interactive web-based plots. Plots can be drawn in `IPython Notebooks <https://plot.ly/ipython-notebooks/>`__ , edited with R or MATLAB, modified in a GUI, or embedded in apps and dashboards. Plotly is free for unlimited sharing, and has `cloud <https://plot.ly/product/plans/>`__, `offline <https://plot.ly/python/offline/>`__, or `on-premise <https://plot.ly/product/enterprise/>`__ accounts for private use.
    Original file line numberDiff line numberDiff line change
    @@ -93,6 +93,12 @@ targets the IPython Notebook environment.
    9393

    9494
    9595

    96+
    `Pandas-Qt <https://github.com/datalyze-solutions/pandas-qt>`__
    97+
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    98+
    99+
    Spun off from the main pandas library, the `Pandas-Qt <https://github.com/datalyze-solutions/pandas-qt>`__
    100+
    library enables DataFrame visualization and manipulation in PyQt4 and PySide applications.
    101+
    96102
    .. _ecosystem.ide:
    97103

    98104
    IDE

    doc/source/faq.rst

    Lines changed: 3 additions & 75 deletions
    Original file line numberDiff line numberDiff line change
    @@ -110,78 +110,6 @@ details.
    110110
    Visualizing Data in Qt applications
    111111
    -----------------------------------
    112112

    113-
    .. warning::
    114-
    115-
    The ``qt`` support is **deprecated and will be removed in a future version**.
    116-
    We refer users to the external package `pandas-qt <https://github.com/datalyze-solutions/pandas-qt>`_.
    117-
    118-
    There is experimental support for visualizing DataFrames in PyQt4 and PySide
    119-
    applications. At the moment you can display and edit the values of the cells
    120-
    in the DataFrame. Qt will take care of displaying just the portion of the
    121-
    DataFrame that is currently visible and the edits will be immediately saved to
    122-
    the underlying DataFrame
    123-
    124-
    To demonstrate this we will create a simple PySide application that will switch
    125-
    between two editable DataFrames. For this will use the ``DataFrameModel`` class
    126-
    that handles the access to the DataFrame, and the ``DataFrameWidget``, which is
    127-
    just a thin layer around the ``QTableView``.
    128-
    129-
    .. code-block:: python
    130-
    131-
    import numpy as np
    132-
    import pandas as pd
    133-
    from pandas.sandbox.qtpandas import DataFrameModel, DataFrameWidget
    134-
    from PySide import QtGui, QtCore
    135-
    136-
    # Or if you use PyQt4:
    137-
    # from PyQt4 import QtGui, QtCore
    138-
    139-
    class MainWidget(QtGui.QWidget):
    140-
    def __init__(self, parent=None):
    141-
    super(MainWidget, self).__init__(parent)
    142-
    143-
    # Create two DataFrames
    144-
    self.df1 = pd.DataFrame(np.arange(9).reshape(3, 3),
    145-
    columns=['foo', 'bar', 'baz'])
    146-
    self.df2 = pd.DataFrame({
    147-
    'int': [1, 2, 3],
    148-
    'float': [1.5, 2.5, 3.5],
    149-
    'string': ['a', 'b', 'c'],
    150-
    'nan': [np.nan, np.nan, np.nan]
    151-
    }, index=['AAA', 'BBB', 'CCC'],
    152-
    columns=['int', 'float', 'string', 'nan'])
    153-
    154-
    # Create the widget and set the first DataFrame
    155-
    self.widget = DataFrameWidget(self.df1)
    156-
    157-
    # Create the buttons for changing DataFrames
    158-
    self.button_first = QtGui.QPushButton('First')
    159-
    self.button_first.clicked.connect(self.on_first_click)
    160-
    self.button_second = QtGui.QPushButton('Second')
    161-
    self.button_second.clicked.connect(self.on_second_click)
    162-
    163-
    # Set the layout
    164-
    vbox = QtGui.QVBoxLayout()
    165-
    vbox.addWidget(self.widget)
    166-
    hbox = QtGui.QHBoxLayout()
    167-
    hbox.addWidget(self.button_first)
    168-
    hbox.addWidget(self.button_second)
    169-
    vbox.addLayout(hbox)
    170-
    self.setLayout(vbox)
    171-
    172-
    def on_first_click(self):
    173-
    '''Sets the first DataFrame'''
    174-
    self.widget.setDataFrame(self.df1)
    175-
    176-
    def on_second_click(self):
    177-
    '''Sets the second DataFrame'''
    178-
    self.widget.setDataFrame(self.df2)
    179-
    180-
    if __name__ == '__main__':
    181-
    import sys
    182-
    183-
    # Initialize the application
    184-
    app = QtGui.QApplication(sys.argv)
    185-
    mw = MainWidget()
    186-
    mw.show()
    187-
    app.exec_()
    113+
    There is no support for such visualization in pandas. However, the external
    114+
    package `pandas-qt <https://github.com/datalyze-solutions/pandas-qt>`_ does
    115+
    provide this functionality.

    doc/source/whatsnew/v0.19.0.txt

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -505,6 +505,7 @@ Deprecations
    505505
    Removal of prior version deprecations/changes
    506506
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    507507

    508+
    - The ``pd.sandbox`` module has been removed in favor of the external library ``pandas-qt`` (:issue:`13670`)
    508509
    - ``DataFrame.to_csv()`` has dropped the ``engine`` parameter, as was deprecated in 0.17.1 (:issue:`11274`, :issue:`13419`)
    509510
    - ``DataFrame.to_dict()`` has dropped the ``outtype`` parameter in favor of ``orient`` (:issue:`13627`, :issue:`8486`)
    510511
    - ``pd.Categorical`` has dropped the ``levels`` attribute in favour of ``categories`` (:issue:`8376`)

    pandas/api/tests/test_api.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -28,7 +28,7 @@ class TestPDApi(Base, tm.TestCase):
    2828

    2929
    # these are optionally imported based on testing
    3030
    # & need to be ignored
    31-
    ignored = ['tests', 'rpy', 'sandbox', 'locale']
    31+
    ignored = ['tests', 'rpy', 'locale']
    3232

    3333
    # top-level sub-packages
    3434
    lib = ['api', 'compat', 'computation', 'core',

    pandas/sandbox/__init__.py

    Whitespace-only changes.

    pandas/sandbox/qtpandas.py

    Lines changed: 0 additions & 145 deletions
    This file was deleted.

    setup.py

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -560,7 +560,6 @@ def pxd(name):
    560560
    'pandas.io.sas',
    561561
    'pandas.formats',
    562562
    'pandas.rpy',
    563-
    'pandas.sandbox',
    564563
    'pandas.sparse',
    565564
    'pandas.sparse.tests',
    566565
    'pandas.stats',

    0 commit comments

    Comments
     (0)
    0