@@ -5021,8 +5021,7 @@ Example of a callable using PostgreSQL `COPY clause
5021
5021
conn : sqlalchemy.engine.Engine or sqlalchemy.engine.Connection
5022
5022
keys : list of str
5023
5023
Column names
5024
- data_iter : generator of list
5025
- Each item contains a list of values to be inserted
5024
+ data_iter : Iterable that iterates the values to be inserted
5026
5025
"""
5027
5026
# gets a DBAPI connection that can provide a cursor
5028
5027
dbapi_conn = conn.connection
@@ -5057,15 +5056,17 @@ table name and optionally a subset of columns to read.
5057
5056
5058
5057
pd.read_sql_table(' data' , engine)
5059
5058
5060
- Note that pandas infers column dtypes from query outputs, and not by looking
5061
- up data types in the physical database schema. For example, assume ``userid ``
5062
- is an integer column in a table. Then, intuitively, ``select userid ... `` will
5063
- return integer-valued series, while ``select cast(userid as text) ... `` will
5064
- return object-valued (str) series. Accordingly, if the query output is empty,
5065
- then all resulting columns will be returned as object-valued (since they are
5066
- most general). If you foresee that your query will sometimes generate an empty
5067
- result, you may want to explicitly typecast afterwards to ensure dtype
5068
- integrity.
5059
+ .. note ::
5060
+
5061
+ Note that pandas infers column dtypes from query outputs, and not by looking
5062
+ up data types in the physical database schema. For example, assume ``userid ``
5063
+ is an integer column in a table. Then, intuitively, ``select userid ... `` will
5064
+ return integer-valued series, while ``select cast(userid as text) ... `` will
5065
+ return object-valued (str) series. Accordingly, if the query output is empty,
5066
+ then all resulting columns will be returned as object-valued (since they are
5067
+ most general). If you foresee that your query will sometimes generate an empty
5068
+ result, you may want to explicitly typecast afterwards to ensure dtype
5069
+ integrity.
5069
5070
5070
5071
You can also specify the name of the column as the ``DataFrame `` index,
5071
5072
and specify a subset of columns to be read.
0 commit comments