Yeah, whenever you have a matrix of data and each column represents something different, then using a DataFrame is very convenient (and that's really all there is to it - convenience). For instance, given student exam data I might express "Compute the average grade for each socioeconomic group", where "grade" and "socioeconomic group" are both columns in my dataframe, and there is one row per student. The same can be done with a matrix, but it'll be a) longer to write and b) much more error-prone, since I'll have to write data[1] instead of data[:grade], for instance.
On Saturday, October 25, 2014 11:44:15 AM UTC-4, John Myles White wrote: > > Consider doing research in any domain (e.g. epidemiology, economics, > psychology, sociology, consumer research,...) where you measure N variables > (each having a different type) about a single unit of observation. Then the > DataFrame is the most natural representation of that domain’s data. > > — John > > On Oct 25, 2014, at 8:40 AM, Daniel Carrera <[email protected] > <javascript:>> wrote: > > > There was a time when my job was to write database-driven web > applications. I worked with MySQL a lot. I understand that a data frame has > the same type of content as a database, but they do not seem to be used to > solve the same types of problems as something like MySQL. I thought data > frames were used in more science-related contexts. > > Cheers, > Daniel. > > > On 25 October 2014 17:27, John Myles White <[email protected] > <javascript:>> wrote: > >> Have you ever used a database? A DataFrame is just a database that’s >> stored in memory. >> >> — John >> >> On Oct 25, 2014, at 5:37 AM, Daniel Carrera <[email protected] >> <javascript:>> wrote: >> >> > Hello, >> > >> > This is a fairly naive question. I have observed for the last two years >> that many people really like data frames. R users obviously like them, and >> the Python and Julia communities thought it was worth adding that feature >> to their languages too. However, as an astronomer, I have not yet had a >> problem that would be solved by data frames. I use Julia to analyze >> hydrodynamic simulations. I can imagine that data frames could have a role >> in photographic data where some pixels are missing. >> > >> > Are you a scientist or engineer currently using data frames to solve a >> problem? I would love to hear about what you do with data frames and why >> you find them useful. >> > >> > Cheers, >> > Daniel. >> >> > > > -- > When an engineer says that something can't be done, it's a code phrase > that means it's not fun to do. > > >
