Programming in Data Science
Learn about and discuss programming for data science
- 12 Topics
- 31 Replies
Welcome to the Programming in Data Science part of the Community 👋Some ideas for discussion for this section: New technologies that people are using and finding useful in their data science work Questions on how to use a particular programming language or technology, for example how to use ggplot in R for making charts or how to use Docker Sharing of resources you find elsewhere that might be of use to the community And anything else relevant to programming in data science!
Hey,So in R I have a tibble that is 1 x 9 and what I want to do is basically take those 9 variables and move them out of the tibble and become their own, free, variables.Aka I want to turn something like:df <- tibble::tibble(a = 1, b = 2, c = 3)intoa <- 1b <- 2c <- 3Without having to either individual put each variable into a new one witha <- df$ab <- df$bc <- df$cThings I have tried:tibble::deframe(df)unlist(df)Is there like a single function somewhere that can do this or do I have to faff about?
Seems like to read data from Redshift I have (at least) 2 options: DBI::dbConnect(connection, ‘table-name’)vsdplyr::tbl(connection, ‘table-name’) The latter doesn’t read the whole table into memory and so you can perform all sorts of dplyr goodness on it before using collect() to read it into memory.Why would you ever use dbConnect() in that case?
I’m having some trouble printing the logger in jupyter. I triedimport loggingfrom orion.utils.logging import IO_LOGIO_LOG.setLevel(logging.DEBUG)logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)andlogging.basicConfig(filename='example.log', filemode='w', level=logging.DEBUG)but I don’t get anything!
I’m interested in knowing how people typically save their plots from RStudio. Are there any ways you’ve found to be super quick and easy, or alternatively anything that should be avoided? E.g. maybe a certain way always skews the dimensions.Would be great if you could vote on the poll below so I can see what the most commonly used method is!
Already have an account? Login
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.