class_docstr: override the load method of langchain.document_loaders.DataFrameLoaders to ignore rows with 'None' values
class_docstr_tok: ["override","the","load","method","of","langchain.document_loaders.DataFrameLoaders","to","ignore","rows","with","'None","'","values"]
docstr: Loads the dataframe as a list of documents
docstr_tok: ["Loads","the","dataframe","as","a","list","of","documents"]
code: def load(self) -> List[Document]:
      """Loads the dataframe as a list of documents"""
      documents = []
      for n_row, frame in self._data_frame[
          self._page_content_column
      ].items():
          if pd.notnull(frame):
              # ignore rows with None values
              column_name = self._page_content_column
  
              document_contents = frame
  
              documents.append(
                  Document(
                      page_content=document_contents,
                      metadata={
                          "source": "dataframe",
                          "row": n_row,
                          "column": column_name,
                      },
                  )
              )
      return documents
  
imports: import json
  from dataclasses import dataclass
  from functools import lru_cache, partial
  from typing import Any, Dict, List, Union
  import html2text
  import openai
  import pandas
  import requests
  import writer
  from langchain import Writer
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
  from langchain.docstore.document import Document
  from langchain.document_loaders import DataFrameLoader
  from langchain.embeddings.base import Embeddings
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
  from langchain.vectorstores import FAISS, Chroma, VectorStore
  from pydantic import BaseModel, Extra, Field, validator
  from mindsdb.integrations.handlers.chromadb_handler.chromadb_handler import get_chromadb
  from mindsdb.integrations.handlers.rag_handler.exceptions import InvalidOpenAIModel, InvalidPromptTemplate, InvalidWriterModel, UnsupportedLLM, UnsupportedVectorStore
label_desc: Use image node_id 2 for calling the DfLoader obj's underlying member method code with example usage: obj.load() and returns: documents