class_docstr: An implementation of the dataframe interchange protocol.
  Based on https://github.com/ibis-project/ibis/pull/6733
  
  This is a thin shim around the pyarrow implementation to allow for:
   - Accessing a few of the metadata queries without executing the expression.
   - Caching the execution on the dataframe object to avoid re-execution if
     multiple methods are accessed.
  
   The dataframe interchange protocol may be found here:
   https://data-apis.org/dataframe-protocol/latest/API.html
class_docstr_tok: ["An","implementation","of","the","dataframe","interchange","protocol",".","Based","on","https",":","\/\/github.com\/ibis-project\/ibis\/pull\/6733","This","is","a","thin","shim","around","the","pyarrow","implementation","to","allow","for",":","-","Accessing","a","few","of","the","metadata","queries","without","executing","the","expression",".","-","Caching","the","execution","on","the","dataframe","object","to","avoid","re-execution","if","multiple","methods","are","accessed",".","The","dataframe","interchange","protocol","may","be","found","here",":","https",":","\/\/data-apis.org\/dataframe-protocol\/latest\/API.html"]
docstr: Returns the pyarrow implementation of the __dataframe__ protocol.
  If the backing Dataset hasn't been executed yet, this will result
  in executing and caching the result.
docstr_tok: ["Returns","the","pyarrow","implementation","of","the","__dataframe__","protocol",".","If","the","backing","Dataset","has","n't","been","executed","yet",",","this","will","result","in","executing","and","caching","the","result","."]
code: def _pyarrow_df(self):
      """Returns the pyarrow implementation of the __dataframe__ protocol.
      If the backing Dataset hasn't been executed yet, this will result
      in executing and caching the result."""
      if self._pyarrow_table is None:
          self._pyarrow_table = self._dataset.fetch_query(
              f"select * from {self._dataset.table_name()}",
              schema=self._dataset.table_schema(),
          )
      return self._pyarrow_table.__dataframe__(
          nan_as_null=self._nan_as_null,
          allow_copy=self._allow_copy,
      )
  
imports: import pyarrow
  from functools import cached_property
  from typing import Sequence, Optional
  from .sql import SqlDataset
label_desc: Use image node_id 2 for calling the SqlDatasetDataFrame obj's underlying member method code with example usage: obj._pyarrow_df() and returns: self