Skip to content

Commit

Permalink
Backport PR #34458 on branch 1.0.x (CLN: Clean csv files in test data…
Browse files Browse the repository at this point in the history
… GH34427) (#34664)

Co-authored-by: Natalie Jann <47032941+najann@users.noreply.github.com>
  • Loading branch information
simonjayhawkins and najann authored Jun 9, 2020
1 parent 81371a4 commit 29edbab
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 559 deletions.
4 changes: 2 additions & 2 deletions doc/source/getting_started/comparison/comparison_with_sas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Reading external data

Like SAS, pandas provides utilities for reading in data from
many formats. The ``tips`` dataset, found within the pandas
tests (`csv <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/data/tips.csv>`_)
tests (`csv <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/io/data/csv/tips.csv>`_)
will be used in many of the following examples.

SAS provides ``PROC IMPORT`` to read csv data into a data set.
Expand All @@ -131,7 +131,7 @@ The pandas method is :func:`read_csv`, which works similarly.
.. ipython:: python
url = ('https://raw.github.com/pandas-dev/'
'pandas/master/pandas/tests/data/tips.csv')
'pandas/master/pandas/tests/io/data/csv/tips.csv')
tips = pd.read_csv(url)
tips.head()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ structure.
.. ipython:: python
url = ('https://raw.github.com/pandas-dev'
'/pandas/master/pandas/tests/data/tips.csv')
'/pandas/master/pandas/tests/io/data/csv/tips.csv')
tips = pd.read_csv(url)
tips.head()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Reading external data

Like Stata, pandas provides utilities for reading in data from
many formats. The ``tips`` data set, found within the pandas
tests (`csv <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/data/tips.csv>`_)
tests (`csv <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/io/data/csv/tips.csv>`_)
will be used in many of the following examples.

Stata provides ``import delimited`` to read csv data into a data set in memory.
Expand All @@ -128,7 +128,7 @@ the data set if presented with a url.
.. ipython:: python
url = ('https://raw.github.com/pandas-dev'
'/pandas/master/pandas/tests/data/tips.csv')
'/pandas/master/pandas/tests/io/data/csv/tips.csv')
tips = pd.read_csv(url)
tips.head()
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ for more information. By coloring these curves differently for each class
it is possible to visualize data clustering. Curves belonging to samples
of the same class will usually be closer together and form larger structures.

**Note**: The "Iris" dataset is available `here <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/data/iris.csv>`__.
**Note**: The "Iris" dataset is available `here <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/io/data/csv/iris.csv>`__.

.. ipython:: python
Expand Down Expand Up @@ -1025,7 +1025,7 @@ be colored differently.
See the R package `Radviz <https://cran.r-project.org/package=Radviz/>`__
for more information.

**Note**: The "Iris" dataset is available `here <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/data/iris.csv>`__.
**Note**: The "Iris" dataset is available `here <https://raw.github.com/pandas-dev/pandas/master/pandas/tests/io/data/csv/iris.csv>`__.

.. ipython:: python
Expand Down
2 changes: 1 addition & 1 deletion pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def iris(datapath):
"""
The iris dataset as a DataFrame.
"""
return pd.read_csv(datapath("data", "iris.csv"))
return pd.read_csv(datapath("io", "data", "csv", "iris.csv"))


@pytest.fixture(params=["nlargest", "nsmallest"])
Expand Down
151 changes: 0 additions & 151 deletions pandas/tests/data/iris.csv

This file was deleted.

Loading

0 comments on commit 29edbab

Please sign in to comment.