Skip to content

Commit 77cce7b

Browse files
committed
DOC - rewording two docstrings
1 parent aa787ac commit 77cce7b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

skrub/_string_encoder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818

1919
class StringEncoder(TransformerMixin, SingleColumnTransformer):
20-
"""Encode string features by using tf-idf vectorization and truncated singular \
21-
value decomposition (SVD).
20+
"""Encode string columns as a numeric array using Latent Semantic Analysis (LSA).
2221
2322
First, apply a tf-idf vectorization of the text, then reduce the dimensionality
2423
with a truncated SVD with the given number of parameters.

skrub/_to_datetime.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,15 @@ def _guess_datetime_format(column):
487487

488488

489489
def to_datetime(data, format=None):
490-
"""Convert DataFrame or column to Datetime dtype.
490+
"""Convert a dataframe or series to Datetime dtype.
491+
492+
This function tries to convert the given dataframe or series from string to datetime,
493+
by either testing common datetime formats or using the ``format`` specified
494+
by the user. Columns that cannot be parsed are returned unchanged.
495+
496+
Note that this transformation is stateless, so it should not be used in a
497+
pipeline that is fitted on a training set and then applied to a test set.
498+
Use the :class:`ToDatetime` transformer instead.
491499
492500
.. caution ::
493501
@@ -499,7 +507,7 @@ def to_datetime(data, format=None):
499507
Parameters
500508
----------
501509
data : pandas or polars ``{DataFrame, Series}``
502-
The dataframe or series to transform.
510+
The dataframe or series to convert to Datetime.
503511
504512
format : str or None, optional, default=None
505513
Format string to use to parse datetime strings.

0 commit comments

Comments
 (0)