Skip to content

Commit 6c1aa37

Browse files
authored
docs: Document that validate and filter remove excess columns (#264)
1 parent 4164a53 commit 6c1aa37

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

dataframely/schema.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,9 @@ def validate(
553553
554554
Returns:
555555
The input eager or lazy frame, wrapped in a generic version of the
556-
input's data frame type to reflect schema adherence. This operation is
557-
guaranteed to maintain input ordering of rows.
556+
input's data frame type to reflect schema adherence. Columns not defined
557+
in the schema are removed from the output. This operation is guaranteed
558+
to maintain input ordering of rows.
558559
559560
Raises:
560561
SchemaError: If `eager=True` and the input data frame misses columns or
@@ -704,7 +705,8 @@ def filter(
704705
Returns:
705706
A tuple of the validated rows in the input data frame (potentially
706707
empty) and a simple dataclass carrying information about the rows of the
707-
data frame which could not be validated successfully. Just like in polars'
708+
data frame which could not be validated successfully. Columns not defined
709+
in the schema are removed from the output. Just like in polars'
708710
native :meth:`~polars.DataFrame.filter`, the order of rows in the returned
709711
data frame is maintained.
710712

0 commit comments

Comments
 (0)