Fix merge conflict in sql docs · pandas-dev/pandas@db2f6d9 (original) (raw)

`` @@ -3108,11 +3108,7 @@ below and the SQLAlchemy `documentation <http://docs.sqlalchemy.org/en/rel_0_9/c

``

3108

3108

`Writing DataFrames

`

3109

3109

`~~~~~~~~~~~~~~~~~~

`

3110

3110

``

3111

``

`-

<<<<<<< HEAD

`

3112

``

`-

Assuming the following data is in a DataFrame "data", we can insert it into

`

3113

``

`-

=======

`

3114

3111

``` Assuming the following data is in a DataFrame data, we can insert it into


`3115`

``

`-

>>>>>>> 6314e6f... ENH #4163 Tweaks to docs, avoid mutable default args, mysql tests

`

`3116`

`3112`

`` the database using :func:`~pandas.io.sql.to_sql`.

``

`3117`

`3113`

``

`3118`

`3114`

``

`@@ -3209,28 +3205,19 @@ Of course, you can specify a more "complex" query.

`

`3209`

`3205`

`You can also run a plain query without creating a dataframe with

`

`3210`

`3206`

`` :func:`~pandas.io.sql.execute`. This is useful for queries that don't return values,

``

`3211`

`3207`

``` such as INSERT. This is functionally equivalent to calling ``execute`` on the

3212

``

`-

SQLAlchemy engine or db connection object. Again, ou must use the SQL syntax

`

``

3208

`+

SQLAlchemy engine or db connection object. Again, you must use the SQL syntax

`

3213

3209

`variant appropriate for your database.

`

3214

3210

``

3215

3211

`.. code-block:: python

`

3216

3212

``

3217

3213

` sql.execute('SELECT * FROM table_name', engine)

`

3218

3214

``

3219

``

`-

<<<<<<< HEAD

`

3220

``

`-

<<<<<<< HEAD

`

3221

``

`` -

:func:~pandas.io.sql.tquery returns a list of tuples corresponding to each row.

``

``

3215

`+

sql.execute('INSERT INTO table_name VALUES(?, ?, ?)', engine, params=[('id', 1, 12.2, True)])

`

3222

3216

``

3223

``

`` -

:func:~pandas.io.sql.uquery does the same thing as tquery, but instead of

``

3224

``

`-

returning results it returns the number of related rows.

`

3225

``

`-

=======

`

3226

``

`-

ac6bf42... ENH #4163 Added more robust type coertion, datetime parsing, and parse date options. Updated optional dependancies

`

3227

3217

``

3228

3218

`` In addition, the class :class:~pandas.io.sql.PandasSQLWithEngine can be

``

3229

3219

`instantiated directly for more manual control over the SQL interaction.

`

3230

``

`-

=======

`

3231

``

`-

sql.execute('INSERT INTO table_name VALUES(?, ?, ?)', engine, params=[('id', 1, 12.2, True)])

`

3232

3220

``

3233

``

`-

6314e6f... ENH #4163 Tweaks to docs, avoid mutable default args, mysql tests

`

3234

3221

``

3235

3222

`Engine connection examples

`

3236

3223

`~~~~~~~~~~~~~~~~~~~~~~~~~~

`