Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d19c205

Browse files
Damien Garaudwesm
Damien Garaud
authored andcommittedJan 19, 2013
DOC: Add docstring to the 'io.sql.has_table' function.
1 parent 78d090a commit d19c205

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎pandas/io/sql.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ def write_frame(frame, name=None, con=None, flavor='sqlite', append=False):
178178

179179

180180
def has_table(name, con):
181+
"""
182+
Check if a given SQLite table exists.
183+
184+
Parameters
185+
----------
186+
name: string
187+
SQLite table name
188+
con: DB connection object
189+
"""
181190
sqlstr = "SELECT name FROM sqlite_master WHERE type='table' AND name='%s'" % name
182191
rs = tquery(sqlstr, con)
183192
return len(rs) > 0

0 commit comments

Comments
 (0)
Please sign in to comment.