-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
get_dummies docs #4444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
will include with pr for #4446 |
I'm tempted to keep this one open (it's the api rst, but not in reshaping). Should expand on it really, perhaps will consult wes' book (where get_dummies is mentioned). |
@hayd for 0.13? |
@jreback When is 0.13? |
i'll spam the dev ML and ask |
I think that the sql refactor should drive the timeline |
@hayd This all depends on you and @jtratner deciding best option. I would say:
I don't think 0.13 will be ready for release candidate for say 2 weeks minimum, but could easily do 1 month or even more. I think its worthwhile to include an improved version of SQL, and am +1 on using SQLAlchemy |
@hayd can you just clarify how you expect to get an engine for SQLAlchemy? Once you get that to work, can just pass it to the class it should be fine. At least personally, I think there are so many moving parts here that we may not get it together for 0.13 (in particular, the code to generate a connection from passed in parameters is really complicated and doesn't need to be). I propose we put this in as an experimental feature in a new module with a very small API (i.e., two methods, write_frame and read_sql and that's it), we can call it sql_experimental. Then when we eventually move the new sql code out of experimental, we can leave the aliases there. To simplify for 0.13 ONLY, I propose that this experimental module:
Then, for 0.14, we can replace the existing code in io/sql, move the legacy code to sql_legacy, and leave the legacy code in place for the That way we can put something together and kick the tires. As soon as 0.13 is released, we can settle on a public API for classes and how that all should work out. |
@hayd docs on this? |
@hayd ping? |
Opening wes' book on get_dummies page... |
@hayd doc? |
@hayd docs? |
Sorry for needing so much pinging! I've shameless yoinked one example from wes' book and appended to reshape docs. I wanted to add a final example... but maybe I shouldn't. Wes discusses doing manual get_dummies with delimited strings (of movie categories), by creating an empty DataFrame and filling it. I was going to suggest the following instead, but maybe this discussion is (for now) more of a cookbook example:
Maybe this would even be more useful as a Series/str method (or is it already?). |
there is an issue IIRC, but can't find it right now....about implemented that behavior directly |
here it is....put it on for 0.14....not hard to do this (and could be cythonized) ... #3695 |
maybe could be something ilke
which could just call |
I forgot your neat I suppose kinda weird get_dummies isn't already a Series method as it is. Maybe should take a delimiter, or are thinking split to work in the (shudders) case of a Series of lists? |
thanks you sir! |
Should put this in the online docs and elaborate / add an example to the docstring.
The text was updated successfully, but these errors were encountered: