Skip to content

Commit 578fd76

Browse files
DOC: add examples of database drivers (GH11686)
1 parent a050a33 commit 578fd76

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/source/install.rst

+7
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,13 @@ Optional Dependencies
247247
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions
248248
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage. Version 3.0.0 or higher required, Version 3.2.1 or higher highly recommended.
249249
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 0.8.1 or higher recommended.
250+
* Besides SQLAlchemy, you also need a database specific driver.
251+
Examples of such drivers are `psycopg2 <http://initd.org/psycopg/>`__ for PostgreSQL
252+
or `pymysql <https://github.com/PyMySQL/PyMySQL>`__ for MySQL. For
253+
`SQLite <https://docs.python.org/3.5/library/sqlite3.html>`__ this is
254+
included in Python's standard library by default.
255+
You can find an overview of supported drivers for each SQL dialect in the
256+
`SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__.
250257
* `matplotlib <http://matplotlib.sourceforge.net/>`__: for plotting
251258
* `statsmodels <http://statsmodels.sourceforge.net/>`__
252259
* Needed for parts of :mod:`pandas.stats`

doc/source/io.rst

+9-4
Original file line numberDiff line numberDiff line change
@@ -3741,8 +3741,13 @@ SQL Queries
37413741

37423742
The :mod:`pandas.io.sql` module provides a collection of query wrappers to both
37433743
facilitate data retrieval and to reduce dependency on DB-specific API. Database abstraction
3744-
is provided by SQLAlchemy if installed, in addition you will need a driver library for
3745-
your database.
3744+
is provided by SQLAlchemy if installed. In addition you will need a driver library for
3745+
your database. Examples of such drivers are `psycopg2 <http://initd.org/psycopg/>`__
3746+
for PostgreSQL or `pymysql <https://github.com/PyMySQL/PyMySQL>`__ for MySQL.
3747+
For `SQLite <https://docs.python.org/3.5/library/sqlite3.html>`__ this is
3748+
included in Python's standard library by default.
3749+
You can find an overview of supported drivers for each SQL dialect in the
3750+
`SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__.
37463751

37473752
.. versionadded:: 0.14.0
37483753

@@ -3780,7 +3785,7 @@ To connect with SQLAlchemy you use the :func:`create_engine` function to create
37803785
object from database URI. You only need to create the engine once per database you are
37813786
connecting to.
37823787
For more information on :func:`create_engine` and the URI formatting, see the examples
3783-
below and the SQLAlchemy `documentation <http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html>`__
3788+
below and the SQLAlchemy `documentation <http://docs.sqlalchemy.org/en/latest/core/engines.html>`__
37843789

37853790
.. ipython:: python
37863791
@@ -3994,7 +3999,7 @@ connecting to.
39943999
# or absolute, starting with a slash:
39954000
engine = create_engine('sqlite:////absolute/path/to/foo.db')
39964001
3997-
For more information see the examples the SQLAlchemy `documentation <http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html>`__
4002+
For more information see the examples the SQLAlchemy `documentation <http://docs.sqlalchemy.org/en/latest/core/engines.html>`__
39984003

39994004

40004005
Advanced SQLAlchemy queries

0 commit comments

Comments
 (0)