DataFrame.os_info
- DataFrame.os_info()[source]
A debug summary of an opensearch_py_ml DataFrame internals.
This includes the OpenSearch search queries and query compiler task list.
Returns
- str
A debug summary of an opensearch_py_ml DataFrame internals.
Examples
>>> from tests import OPENSEARCH_TEST_CLIENT
>>> df = oml.DataFrame(OPENSEARCH_TEST_CLIENT, 'flights') >>> df = df[(df.OriginAirportID == 'AMS') & (df.FlightDelayMin > 60)] >>> df = df[['timestamp', 'OriginAirportID', 'DestAirportID', 'FlightDelayMin']] >>> df = df.tail() >>> df timestamp OriginAirportID DestAirportID FlightDelayMin 12608 2018-02-10 01:20:52 AMS CYEG 120 12720 2018-02-10 14:09:40 AMS BHM 255 12725 2018-02-10 00:53:01 AMS ATL 360 12823 2018-02-10 15:41:20 AMS NGO 120 12907 2018-02-11 20:08:25 AMS LIM 225 [5 rows x 4 columns] >>> print(df.os_info()) os_index_pattern: flights Index: os_index_field: _id is_source_field: False Mappings: capabilities: os_field_name is_source os_dtype os_date_format pd_dtype is_searchable is_aggregatable is_scripted aggregatable_os_field_name timestamp timestamp True date strict_date_hour_minute_second datetime64[ns] True True False timestamp OriginAirportID OriginAirportID True keyword None object True True False OriginAirportID DestAirportID DestAirportID True keyword None object True True False DestAirportID FlightDelayMin FlightDelayMin True integer None int64 True True False FlightDelayMin Operations: tasks: [('boolean_filter': ('boolean_filter': {'bool': {'must': [{'term': {'OriginAirportID': 'AMS'}}, {'range': {'FlightDelayMin': {'gt': 60}}}]}})), ('tail': ('sort_field': '_doc', 'count': 5))] size: 5 sort_params: {'_doc': 'desc'} _source: ['timestamp', 'OriginAirportID', 'DestAirportID', 'FlightDelayMin'] body: {'query': {'bool': {'must': [{'term': {'OriginAirportID': 'AMS'}}, {'range': {'FlightDelayMin': {'gt': 60}}}]}}} post_processing: [('sort_index')]