Skip to content

Commit

Permalink
add docstring for ElmerConn.stage_table()
Browse files Browse the repository at this point in the history
  • Loading branch information
christopeak committed May 9, 2024
1 parent 9c36ef5 commit 2b79331
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions psrcelmerpy/conn/elmer_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ def list_recordsets(self, schema_name='', include_base_tables=False):
raise

def stage_table(self, df, table_name):
"""
Send a data frame to a new table in the database, in schema "stg"
Parameters
----------
df : a data frame
The data frame to write to the database
table_name : str
The name that the new staging table is to have.
"""
try:
engine = self.engine
df.to_sql(name=table_name, schema='stg', con=engine, index=False)
Expand Down

0 comments on commit 2b79331

Please sign in to comment.