If you use pandas, Meerschaum lets you tap into your datastreams as DataFrames.
1 2 3 4 5 6 7 8 91011
>>>importmeerschaumasmrsm>>>>>>weather_pipe=mrsm.Pipe('plugin:noaa','weather')>>>>>>### Optionally filter by datetime or other parameters.>>>df=weather_pipe.get_data(...begin='2020-01-01',...end='2021-01-01',...params={'station':['KATL','KCEU']},...)>>>
You can create new pipes on any instance from a DataFrame and index column names.
A Meerschaum instance is a connector to a database or API that itself contains Meerschaum pipes. Connectors, such as database connections, are represented in the format type:label.
The instance sql:local defaults to a built-in SQLite database.
You can also forego pipes and access tables directly.
1234567
>>>importmeerschaumasmrsm,pandasaspd>>>>>>conn=mrsm.get_connector()>>>df=pd.read_csv('data.csv')>>>>>>### Wrapper around `df.to_sql()`.>>>conn.to_sql(df,chunksize=1000)
Read a table or query into a Pandas DataFrame with conn.read():