Skip to content

.nonzero() is deprecated #2

@dcgonzalez001

Description

@dcgonzalez001

Context

I went through this tutorial on 2019-07-06 with vanilla installs of recommended software applications and updates on a Windows 10 Home x64 machine and encountered a deprecation warning when running 2-Exploratory-Data-Analysis.ipynb in the jupyter notebook.

Issue

Series.nonzero() is deprecated and will be removed in a future version.

Solution

Update code in 2-Exploratory-Data-Analysis.ipynb from original:

uniques = data[comedian].nonzero()[0].size

to

# uniques = data[comedian].nonzero()[0].size (deprecated)
uniques = data[comedian].to_numpy().nonzero()[0].size

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy