Skip to content
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

CLN: removed pandas.sandbox #13670

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions doc/source/ecosystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ targets the IPython Notebook environment.

`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.

`Pandas-Qt <https://github.com/datalyze-solutions/pandas-qt>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Spun off from the main pandas library, the `Pandas-Qt <https://github.com/datalyze-solutions/pandas-qt>`__
library enables DataFrame visualization and manipulation in PyQt4 and PySide applications.

.. _ecosystem.ide:

IDE
Expand Down
78 changes: 3 additions & 75 deletions doc/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,78 +110,6 @@ details.
Visualizing Data in Qt applications
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about removing whole section, and moves to ecosystem?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So remove the entire thing about Qt applications? I don't fully understand the second part of your question.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The second part means ecosystem.rst which lists some related projects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Done.

-----------------------------------

.. warning::

The ``qt`` support is **deprecated and will be removed in a future version**.
We refer users to the external package `pandas-qt <https://github.com/datalyze-solutions/pandas-qt>`_.

There is experimental support for visualizing DataFrames in PyQt4 and PySide
applications. At the moment you can display and edit the values of the cells
in the DataFrame. Qt will take care of displaying just the portion of the
DataFrame that is currently visible and the edits will be immediately saved to
the underlying DataFrame

To demonstrate this we will create a simple PySide application that will switch
between two editable DataFrames. For this will use the ``DataFrameModel`` class
that handles the access to the DataFrame, and the ``DataFrameWidget``, which is
just a thin layer around the ``QTableView``.

.. code-block:: python

import numpy as np
import pandas as pd
from pandas.sandbox.qtpandas import DataFrameModel, DataFrameWidget
from PySide import QtGui, QtCore

# Or if you use PyQt4:
# from PyQt4 import QtGui, QtCore

class MainWidget(QtGui.QWidget):
def __init__(self, parent=None):
super(MainWidget, self).__init__(parent)

# Create two DataFrames
self.df1 = pd.DataFrame(np.arange(9).reshape(3, 3),
columns=['foo', 'bar', 'baz'])
self.df2 = pd.DataFrame({
'int': [1, 2, 3],
'float': [1.5, 2.5, 3.5],
'string': ['a', 'b', 'c'],
'nan': [np.nan, np.nan, np.nan]
}, index=['AAA', 'BBB', 'CCC'],
columns=['int', 'float', 'string', 'nan'])

# Create the widget and set the first DataFrame
self.widget = DataFrameWidget(self.df1)

# Create the buttons for changing DataFrames
self.button_first = QtGui.QPushButton('First')
self.button_first.clicked.connect(self.on_first_click)
self.button_second = QtGui.QPushButton('Second')
self.button_second.clicked.connect(self.on_second_click)

# Set the layout
vbox = QtGui.QVBoxLayout()
vbox.addWidget(self.widget)
hbox = QtGui.QHBoxLayout()
hbox.addWidget(self.button_first)
hbox.addWidget(self.button_second)
vbox.addLayout(hbox)
self.setLayout(vbox)

def on_first_click(self):
'''Sets the first DataFrame'''
self.widget.setDataFrame(self.df1)

def on_second_click(self):
'''Sets the second DataFrame'''
self.widget.setDataFrame(self.df2)

if __name__ == '__main__':
import sys

# Initialize the application
app = QtGui.QApplication(sys.argv)
mw = MainWidget()
mw.show()
app.exec_()
There is no support for such visualization in pandas. However, the external
package `pandas-qt <https://github.com/datalyze-solutions/pandas-qt>`_ does
provide this functionality.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.19.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ Deprecations
Removal of prior version deprecations/changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- The ``pd.sandbox`` module has been removed in favor of the external library ``pandas-qt`` (:issue:`13670`)
- ``DataFrame.to_csv()`` has dropped the ``engine`` parameter, as was deprecated in 0.17.1 (:issue:`11274`, :issue:`13419`)
- ``DataFrame.to_dict()`` has dropped the ``outtype`` parameter in favor of ``orient`` (:issue:`13627`, :issue:`8486`)
- ``pd.Categorical`` has dropped the ``levels`` attribute in favour of ``categories`` (:issue:`8376`)
Expand Down
2 changes: 1 addition & 1 deletion pandas/api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TestPDApi(Base, tm.TestCase):

# these are optionally imported based on testing
# & need to be ignored
ignored = ['tests', 'rpy', 'sandbox', 'locale']
ignored = ['tests', 'rpy', 'locale']

# top-level sub-packages
lib = ['api', 'compat', 'computation', 'core',
Expand Down
Empty file removed pandas/sandbox/__init__.py
Empty file.
145 changes: 0 additions & 145 deletions pandas/sandbox/qtpandas.py

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ def pxd(name):
'pandas.io.sas',
'pandas.formats',
'pandas.rpy',
'pandas.sandbox',
'pandas.sparse',
'pandas.sparse.tests',
'pandas.stats',
Expand Down