Skip to content

repeated warning when running pybaseball.statcast() #467

Open

Description

@johnnynienstedt

The following warning is raised once for each day in the query:

FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_datetime without passing errors and catch exceptions explicitly instead
data_copy[column] = data_copy[column].apply(pd.to_datetime, errors='ignore', format=date_format)

Activity

  1. mattdennewitz commented on Feb 21, 2025

    @mattdennewitz

    The warning is worthwhile to keep, and can be suppressed in your implementation like so:

    import warnings
    
    with warnings.catch_warnings():
        warnings.simplefilter("ignore", FutureWarning)
    
        df = statcast(...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions