Git Product home page Git Product logo

Comments (4)

simon-mo avatar simon-mo commented on May 10, 2024

We will skip the test for this at this moment.

from modin.

kunalgosar avatar kunalgosar commented on May 10, 2024

I am reopening this issue as it needs a permanent fix

from modin.

dchigarev avatar dchigarev commented on May 10, 2024

It seems that this problem is already fixed, at least this reproduced works as expected in the current master:

reproducer
if __name__ == "__main__":
    import pandas
    import modin.pandas as pd

    future_int = {
        "A": ["a", "b", "c", "d"],
        "B": [0, 1, 2, 3],
        "C": [4, 5, 6, 7],
        "D": [8, 9, 10, 11],
    }
    md_df, pd_df = pd.DataFrame(future_int), pandas.DataFrame(future_int)

    print("pd dtypes:\n", pd_df.groupby("A").median().dtypes, sep="")
    print("md dtypes:\n", md_df.groupby("A").median().dtypes, sep="")

    future_float = {
        "A": ["a", "b", "b", "d"],
        "B": [0, 1, 2, 3],
        "C": [4, 5, 6, 7],
        "D": [8, 9, 10, 11],
    }
    md_df, pd_df = pd.DataFrame(future_float), pandas.DataFrame(future_float)
    print("\n\npd dtypes:\n", pd_df.groupby("A").median().dtypes, sep="")
    print("md dtypes:\n", md_df.groupby("A").median().dtypes, sep="")

Output:

pd dtypes:
B    int64
C    int64
D    int64
dtype: object
md dtypes:
B    int64
C    int64
D    int64
dtype: object


pd dtypes:
B    float64
C    float64
D    float64
dtype: object
md dtypes:
B    float64
C    float64
D    float64
dtype: object

Since for groupby aggregation we use pandas version under the hood and it encapsulates all logic about downcasting dtypes in it, we'll always gonna get same dtypes as pandas gives.

So @devin-petersohn what do you think about closing that issue?

from modin.

devin-petersohn avatar devin-petersohn commented on May 10, 2024

Yes, I have standardized the type inference in Modin, so this should be closed.

from modin.

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.