feat: add setter to dataframe to handle missing text_keys (#6785)

* update the templates and add error handling

* [autofix.ci] apply automated fixes

* updated changes

* update to template from main

* Update split_text.py

* Add validation for text key in DataFrame setter

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Edwin Jose 2025-02-24 15:47:56 -05:00 committed by GitHub
commit 38c895994a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,6 +72,9 @@ class DataFrame(pandas_DataFrame):
@text_key.setter
def text_key(self, value: str) -> None:
if value not in self.columns:
msg = f"Text key '{value}' not found in DataFrame columns"
raise ValueError(msg)
self._text_key = value
@property