MCPcopy
hub / github.com/pandas-dev/pandas / drop_table

Method drop_table

pandas/io/sql.py:2075–2083  ·  view source on GitHub ↗
(self, table_name: str, schema: str | None = None)

Source from the content-addressed store, hash-verified

2073 return tbl
2074
2075 def drop_table(self, table_name: str, schema: str | None = None) -> None:
2076 schema = schema or self.meta.schema
2077 if self.has_table(table_name, schema):
2078 self.meta.reflect(
2079 bind=self.con, only=[table_name], schema=schema, views=True
2080 )
2081 with self.run_transaction():
2082 self.get_table(table_name, schema).drop(bind=self.con)
2083 self.meta.clear()
2084
2085 def delete_rows(self, table_name: str, schema: str | None = None) -> None:
2086 schema = schema or self.meta.schema

Callers 15

createMethod · 0.45
drop_tableFunction · 0.45
test_api_to_sqlFunction · 0.45
test_api_to_sql_failFunction · 0.45
test_api_to_sql_replaceFunction · 0.45
test_api_to_sql_appendFunction · 0.45
test_api_to_sql_seriesFunction · 0.45
test_api_roundtripFunction · 0.45

Calls 5

has_tableMethod · 0.95
run_transactionMethod · 0.95
get_tableMethod · 0.95
clearMethod · 0.80
dropMethod · 0.45

Tested by 15

drop_tableFunction · 0.36
test_api_to_sqlFunction · 0.36
test_api_to_sql_failFunction · 0.36
test_api_to_sql_replaceFunction · 0.36
test_api_to_sql_appendFunction · 0.36
test_api_to_sql_seriesFunction · 0.36
test_api_roundtripFunction · 0.36
test_api_timedeltaFunction · 0.36