Giter Club home page Giter Club logo

Comments (3)

rebeccabilbro avatar rebeccabilbro commented on May 27, 2024

Hello @KimByoungmo and thank you for using Yellowbrick!

This is an issue that has been noted in the past (#1180), and we can definitely appreciate your use case. However, Yellowbrick is designed to work with or without pandas, treating X and y as numpy arrays. Because of that, we cannot simply change y[i] to y.iloc[i], as that would break Radviz's functionality for all users who are not passing in a dataframe.

That said, if you have any ideas about how to change the functionality so that Yellowbrick works more easily with both pandas and non-pandas data, we're all ears! Would you be interested in opening up a PR with some exploratory code to handle non-continuously indexed dataframes that passes both our pandas and our numpy integration tests?

from yellowbrick.

KimByoungmo avatar KimByoungmo commented on May 27, 2024

@rebeccabilbro

I think it would be better to use "isinstance" function
for instance, refer to below code

if isinstance(my_object,pd.Series) or isinstance(my_object,pd.DataFrame) :
##my_object.iloc[i]
else :
##my_object[i]

from yellowbrick.

rebeccabilbro avatar rebeccabilbro commented on May 27, 2024

@KimByoungmo looks like you're on the right track (though I think you'll also want an isinstance(my_object, numpy.array) in there too, right?)

We would welcome looking at a PR from you if you are open to contributing to Yellowbrick. We are a small team of unpaid volunteers, so we depend a lot on the contributions of our users to expand/change current functionality. You can check out our contributor's guide to see how to get started!

from yellowbrick.

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.