Giter Club home page Giter Club logo

Comments (3)

tk3369 avatar tk3369 commented on June 15, 2024

The reason for using sibsp and parch for stack is that they have the same data type. I don't really care much about the context since the main purpose is to remind people about the syntax. Just curious, how much are you bothered by this?

under "Select observations" section, you might want to mention that you can use unique! to mutate to be consistent.

👍

same section - I often use unique!(df, [cols...]) syntax, which only checks certain columns for uniqueness. Might be worth adding

Interesting. I don't know about this syntax before. It seems to be a somewhat "dangerous" usage since some data get lost? Under what circumstances do you want to use this feature?

Not totally clear what that weird "R" symbol - indexing means. Is it just row-wise? Or related to R language?

Haha... good catch. I was in a hurry to make it look nice and didn't pay attention to what it means. I think it came to my mind because in this simple syntax df[1,2] for which the indices are just numbers. Any suggestion?

Also, that syntax can also be used to index columns at the same time - is that worth a note? (I realize space is limited)

Yes, I can add.

from www.ahsmart.com.

tk3369 avatar tk3369 commented on June 15, 2024

See updated cheat sheet at #3

from www.ahsmart.com.

kescobo avatar kescobo commented on June 15, 2024

Just curious, how much are you bothered by this?

Not a lot, just a minor stumbling block. From a usability perspective, it would just be more intuitive if I didn't have to wonder about the data type.

Interesting. I don't know about this syntax before. It seems to be a somewhat "dangerous" usage since some data get lost? Under what circumstances do you want to use this feature?

Yeah, can lose data, but sometimes I want this. For example, I have a longitudinal dataset of subjects, and I just want to use the first time-point from each subject to do some cross-sectional analysis, so I do

sort!(df, :timepoint)
crosssection = unique(df, :subject)

Any suggestion?

Nope, sorry :-)

from www.ahsmart.com.

Related Issues (7)

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.