![]() Woohoo!! Now you have the data from Microsoft table storage saved in the Python dataframe for further proccessing. Retrieve data from Microsoft Azure table storage into Python dataframe from import TableService from import Entity import pandas as pd table_service = TableService(connection_string='mention your connection string') from import TableService CONNECTION_STRING = "mention your connection string" SOURCE_TABLE = "mention your table name" def set_table_service(): """ Set the Azure Table Storage service """ return TableService(connection_string=CONNECTION_STRING) def get_dataframe_from_table_storage_table(table_service, filter_query): """ Create a dataframe from table storage data """ return pd.DataFrame(get_data_from_table_storage_table(table_service, filter_query)) def get_data_from_table_storage_table(table_service, filter_query): """ Retrieve data from Table Storage """ for record in table_service.query_entities( SOURCE_TABLE ): yield record fq = "PartitionKey eq '12345'" ts = set_table_service() df = get_dataframe_from_table_storage_table(table_service=ts, filter_query=fq) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |