So, I love #rstats and #rstudio, but for my next class I have to learn #python and #spyder. I'm not mad about it- been meaning to learn Python for a while. Tell me, #datascience people, what parts of this journey will I enjoy? Despise?
@ianhopkinson @TeslaDuBois I'm a fan of PyCharm as an IDE.
To answer your question, you'll enjoy the consistent syntax. Want to know the length of a list, set, dictionary, or string? It's done the same way. For those data types where indexing makes sense, it's done the same way. Slices? Consistent.
Depending on how many other languages you've used, you'll love or despise that Python starts counting at 0, not 1.
Moving in either direction, you'll despise that the names are different, because the names in R come from statistics and the names in Python come from computer science.
@ianhopkinson @TeslaDuBois They're ordered by insertion order since 3.7:
https://medium.com/junior-dev/python-dictionaries-are-ordered-now-but-how-and-why-5d5a40ee327f
Agreed on unit testing FTW!
@peterdrake @TeslaDuBois my personal massive irritation with Python is that the keys in a dictionary are not ordered (either alphabetically or by order of insertion) - I think this might have changed recently.
Another thing you might like is unit testing with either unittest (builtin) or pytest. Personally I really like seeing the little green ticks of passing tests!