Skip to content

Commit 792ccd0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into ref/index_equiv
2 parents 0b6dea7 + 6f39c4f commit 792ccd0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/source/user_guide/indexing.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ The most robust and consistent way of slicing ranges along arbitrary axes is
262262
described in the :ref:`Selection by Position <indexing.integer>` section
263263
detailing the ``.iloc`` method. For now, we explain the semantics of slicing using the ``[]`` operator.
264264

265+
.. note::
266+
267+
When the :class:`Series` has float indices, slicing will select by position.
268+
265269
With Series, the syntax works exactly as with an ndarray, returning a slice of
266270
the values and the corresponding labels:
267271

pandas/io/sql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,9 @@ def read_sql_query(
473473
--------
474474
>>> from sqlalchemy import create_engine # doctest: +SKIP
475475
>>> engine = create_engine("sqlite:///database.db") # doctest: +SKIP
476+
>>> sql_query = "SELECT int_column FROM test_data" # doctest: +SKIP
476477
>>> with engine.connect() as conn, conn.begin(): # doctest: +SKIP
477-
... data = pd.read_sql_table("data", conn) # doctest: +SKIP
478+
... data = pd.read_sql_query(sql_query, conn) # doctest: +SKIP
478479
"""
479480

480481
check_dtype_backend(dtype_backend)

0 commit comments

Comments
 (0)