notebook goes over how to load data from a polars DataFrame.#!pip install polarsimport polars as pldf = pl.read_csv("example_data/mlb_teams_2012.csv")df.head()<div><style>.dataframe > thead > tr > th,.dataframe > tbody > tr > td {  text-align: right;}</style><small>shape: (5, 3)</small><table border="1" class="dataframe"><thead><tr><th>Team</th><th> &quot;Payroll (millions)&quot;</th><th> &quot;Wins&quot;</th></tr><tr><td>str</td><td>f64</td><td>i64</td></tr></thead><tbody><tr><td>&quot;Nationals&quot;</td><td>81.34</td><td>98</td></tr><tr><td>&quot;Reds&quot;</td><td>82.2</td><td>97</td></tr><tr><td>&quot;Yankees&quot;</td><td>197.96</td><td>95</td></tr><tr><td>&quot;Giants&quot;</td><td>117.62</td><td>94</td></tr><tr><td>&quot;Braves&quot;</td><td>83.31</td><td>94</td></tr></tbody></table></div>from langchain.document_loaders import PolarsDataFrameLoaderloader = PolarsDataFrameLoader(df, page_content_column="Team")loader.load()    [Document(page_content='Nationals', metadata={' "Payroll (millions)"': 81.34, ' "Wins"': 98}),     Document(page_content='Reds', metadata={' "Payroll (millions)"': 82.2, ' "Wins"': 97}),     Document(page_content='Yankees', metadata={' "Payroll (millions)"': 197.96, ' "Wins"': 95}),     Document(page_content='Giants', metadata={' "Payroll (millions)"': 117.62, ' "Wins"': 94}),     Document(page_content='Braves', metadata={' "Payroll (millions)"': 83.31, ' "Wins"': 94}),     Document(page_content='Athletics', metadata={' "Payroll (millions)"': 55.37, ' "Wins"': 94}),     Document(page_content='Rangers', metadata={' "Payroll (millions)"': 120.51, ' "Wins"': 93}),     Document(page_content='Orioles', metadata={' "Payroll (millions)"': 81.43, ' "Wins"': 93}),     Document(page_content='Rays', metadata={' "Payroll (millions)"': 64.17, ' "Wins"': 90}),     Document(page_content='Angels', metadata={' "Payroll (millions)"': 154.49, ' "Wins"': 89}),     Document(page_content='Tigers', metadata={' "Payroll (millions)"': 132.3, ' "Wins"': 88}),
This notebook goes over how to load data from a polars DataFrame.
This notebook goes over how to load data from a polars DataFrame. ->: notebook goes over how to load data from a polars DataFrame.#!pip install polarsimport polars as pldf = pl.read_csv("example_data/mlb_teams_2012.csv")df.head()<div><style>.dataframe > thead > tr > th,.dataframe > tbody > tr > td {  text-align: right;}</style><small>shape: (5, 3)</small><table border="1" class="dataframe"><thead><tr><th>Team</th><th> &quot;Payroll (millions)&quot;</th><th> &quot;Wins&quot;</th></tr><tr><td>str</td><td>f64</td><td>i64</td></tr></thead><tbody><tr><td>&quot;Nationals&quot;</td><td>81.34</td><td>98</td></tr><tr><td>&quot;Reds&quot;</td><td>82.2</td><td>97</td></tr><tr><td>&quot;Yankees&quot;</td><td>197.96</td><td>95</td></tr><tr><td>&quot;Giants&quot;</td><td>117.62</td><td>94</td></tr><tr><td>&quot;Braves&quot;</td><td>83.31</td><td>94</td></tr></tbody></table></div>from langchain.document_loaders import PolarsDataFrameLoaderloader = PolarsDataFrameLoader(df, page_content_column="Team")loader.load()    [Document(page_content='Nationals', metadata={' "Payroll (millions)"': 81.34, ' "Wins"': 98}),     Document(page_content='Reds', metadata={' "Payroll (millions)"': 82.2, ' "Wins"': 97}),     Document(page_content='Yankees', metadata={' "Payroll (millions)"': 197.96, ' "Wins"': 95}),     Document(page_content='Giants', metadata={' "Payroll (millions)"': 117.62, ' "Wins"': 94}),     Document(page_content='Braves', metadata={' "Payroll (millions)"': 83.31, ' "Wins"': 94}),     Document(page_content='Athletics', metadata={' "Payroll (millions)"': 55.37, ' "Wins"': 94}),     Document(page_content='Rangers', metadata={' "Payroll (millions)"': 120.51, ' "Wins"': 93}),     Document(page_content='Orioles', metadata={' "Payroll (millions)"': 81.43, ' "Wins"': 93}),     Document(page_content='Rays', metadata={' "Payroll (millions)"': 64.17, ' "Wins"': 90}),     Document(page_content='Angels', metadata={' "Payroll (millions)"': 154.49, ' "Wins"': 89}),     Document(page_content='Tigers', metadata={' "Payroll (millions)"': 132.3, ' "Wins"': 88}),