Coder Social home page Coder Social logo

Comments (4)

asishm avatar asishm commented on June 7, 2024

You may want to read through #46072

Do you have any data that backs this up?

Perhaps this could be reverted to help out the majority of analysts/data scientists that just want a convenient tool that works as expected by humans and not an idealistic pure python implementation that exists just to satisfy a textbook.

from pandas.

travisturenne avatar travisturenne commented on June 7, 2024

You may want to read through #46072

Wouldn't it have made more sense to treat timedelta as numeric rather than appending every string in a dataframe upon invoking sum()?

from pandas.

rhshadrach avatar rhshadrach commented on June 7, 2024

Thanks for raising this issue!

Many IDEs for Jupyter notebooks crash when .sum() is used, which requires the user to restart their Jupyter notebook instance.

Can you provide an example that causes your notebook to crash?

When users see code:

df[["A", "B"]].sum()

I think it's reasonable for them to expect the result contains two rows indexed by "A" and "B". This would not be the case if we used numeric_only=True as the default: data would be dropped without any indication from the code. On the other hand:

df[["A", "B"]].sum(numeric_only=True)

makes it very clear that columns may be dropped.

In general, I am against the silent dropping of data, and I think that applies here.

from pandas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.