msticpy/data/drivers/local_data_driver.py
def query(
        self, query: str, query_source: QuerySource = None, **kwargs
    ) -> Union[pd.DataFrame, Any]:
        """
        Execute query string and return DataFrame of results.

        Parameters
        ----------
        query : str
            The query to execute
        query_source : QuerySource
            The query definition object

        Returns
        -------
        Union[pd.DataFrame, results.ResultSet]
            A DataFrame (if successfull) or
            the underlying provider result if an error.

        """
        del kwargs
        query_name = query_source.name if query_source else query
        file_path = self.data_files.get(query.casefold())
        if not file_path:
            raise FileNotFoundError(
                f"Data file ({query}) for query {query_name} not found."
            )
        if file_path.endswith("csv"):
            return pd.read_csv(
                file_path, infer_datetime_format=True, parse_dates=["TimeGenerated"]
            )
        data_df = pd.read_pickle(file_path)
        if isinstance(data_df, pd.DataFrame):
            return data_df
        return f"{query} is not a DataFrame ({file_path})."

        Execute query string and return DataFrame of results.

        Parameters
        ----------
        query : str
            The query to execute
        query_source : QuerySource
            The query definition object

        Returns
        -------
        Union[pd.DataFrame, results.ResultSet]
            A DataFrame (if successfull) or
            the underlying provider result if an error.

        
Execute query string and return DataFrame of results.
Parameters

query : str
The query to execute
query_source : QuerySource
The query definition object

Returns

Union[pd.DataFrame, results.ResultSet]
A DataFrame (if successfull) or
the underlying provider result if an error.
Execute query string and return DataFrame of results . Parameters query : str The query to execute query_source : QuerySource The query definition object Returns Union [ pd . DataFrame results . ResultSet ] A DataFrame ( if successfull ) or the underlying provider result if an error .
def query(
        self, query: str, query_source: QuerySource = None, **kwargs
    ) -> Union[pd.DataFrame, Any]:
        del kwargs
        query_name = query_source.name if query_source else query
        file_path = self.data_files.get(query.casefold())
        if not file_path:
            raise FileNotFoundError(
                f"Data file ({query}) for query {query_name} not found."
            )
        if file_path.endswith("csv"):
            return pd.read_csv(
                file_path, infer_datetime_format=True, parse_dates=["TimeGenerated"]
            )
        data_df = pd.read_pickle(file_path)
        if isinstance(data_df, pd.DataFrame):
            return data_df
        return f"{query} is not a DataFrame ({file_path})."
def query ( self , query : str , query_source : QuerySource = None , ** kwargs ) -> Union [ pd . DataFrame , Any ] : del kwargs query_name = query_source . name if query_source else query file_path = self . data_files . get ( query . casefold ( ) ) if not file_path : raise FileNotFoundError ( f"Data file ({query}) for query {query_name} not found." ) if file_path . endswith ( "csv" ) : return pd . read_csv ( file_path , infer_datetime_format = True , parse_dates = [ "TimeGenerated" ] ) data_df = pd . read_pickle ( file_path ) if isinstance ( data_df , pd . DataFrame ) : return data_df return f"{query} is not a DataFrame ({file_path})."
Execute query string and return DataFrame of results.
Execute query string and return DataFrame of results .
"""
        Execute query string and return DataFrame of results.

        Parameters
        ----------
        query : str
            The query to execute
        query_source : QuerySource
            The query definition object

        Returns
        -------
        Union[pd.DataFrame, results.ResultSet]
            A DataFrame (if successfull) or
            the underlying provider result if an error.

        """
self
query
str
query_source
QuerySource