_validate_dataframe() — langchain Function Reference
Architecture documentation for the _validate_dataframe() function in pandas_dataframe.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 857c45f9_f55a_c767_8d26_7140fd3c5fae["_validate_dataframe()"] 3637e9ea_cbb7_422b_bcb3_aa36c4e8aea5["PandasDataFrameOutputParser"] 857c45f9_f55a_c767_8d26_7140fd3c5fae -->|defined in| 3637e9ea_cbb7_422b_bcb3_aa36c4e8aea5 style 857c45f9_f55a_c767_8d26_7140fd3c5fae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/output_parsers/pandas_dataframe.py lines 22–33
def _validate_dataframe(cls, val: Any) -> Any:
import pandas as pd
if issubclass(type(val), pd.DataFrame):
return val
if pd.DataFrame(val).empty:
msg = "DataFrame cannot be empty."
raise ValueError(msg)
msg = "Wrong type for 'dataframe', must be a subclass \
of Pandas DataFrame (pd.DataFrame)"
raise TypeError(msg)
Domain
Subdomains
Source
Frequently Asked Questions
What does _validate_dataframe() do?
_validate_dataframe() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/output_parsers/pandas_dataframe.py.
Where is _validate_dataframe() defined?
_validate_dataframe() is defined in libs/langchain/langchain_classic/output_parsers/pandas_dataframe.py at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free