Hey,
I don’t know but in case you don’t get other good answers, I’m pretty sure Numpy is more of a mathematical library and Pandas is definitely for handling spreadsheet data. So maybe both. Julius On Sun 23. Jan 2022 at 18:28, Chris Angelico <ros...@gmail.com> wrote: > On Mon, 24 Jan 2022 at 04:10, Tobiah <t...@tobiah.org> wrote: > > > > I know very little about either. I need to handle score input files > > for Csound. Each line is a list of floating point values where each > > column has a particular meaning to the program. > > > > I need to compose large (hundreds, thousands, maybe millions) lists > > and be able to do math on, or possibly sort by various columns, among > other > > operations. A common requirement would be to do the same math operation > > on each value in a column, or redistribute the values according to an > > exponential curve, etc. > > > > One wrinkle is that the first column of a Csound score is actually a > > single character. I was thinking if the data types all had to be the > > same, then I'd make a translation table or just use the ascii value > > of the character, but if I could mix types that might be a smidge better. > > > > It seems like both libraries are possible choices. Would one > > be the obvious choice for me? > > > > I'm not an expert, but that sounds like a job for Pandas to me. It's > excellent at handling tabular data, and yes, it's fine with a mixture > of types. Everything else you've described should work fine (not sure > how to redistribute on an exponential curve, but I'm sure it's not > hard). > > BTW, Pandas is built on top of Numpy, so it's kinda "both". > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list