4 ms·
I'd love to see Jupyter (IPython Notebooks) capable of this kind of thing. It'd be awesome to be able to select a column of a Pandas DataFrame and apply a funct
by eloisius 11y ago
I'd love to see Jupyter (IPython Notebooks) capable of this kind of thing. It'd be awesome to be able to select a column of a Pandas DataFrame and apply a function to it.
- zcarter 11y agoTongue in cheek? Alternatively, you should know about: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.apply.html http://pandas.pydata.org/pandas-docs/stable/generated/pandas...
- baldfat 11y agoWell capable? Yes Pandas can do that but I think what you are talking about is you want a GUI tool? Everything about Pandas, IPython(Now Jupyter) and R (And the other data languages) are 100% about performing functions.
- eloisius 11y agoYeah, I mean more as a GUI enhancement. It might be outside the scope of Jupyter, but I think it'd be neat to be able to treat DataFrames like a spreadsheet. Personally, I'm comfortable writing Python, but I bet you'd see more adoption for non-programmer academics who still need to work with data.
- baldfat 11y agoI doubt we will ever see the abandonment of spreadsheets LIKE WE SHOULD. Look at Open Refine you might really like it. http://lemire.me/blog/archives/2014/05/23/you-shouldnt-use-a-spreadsheet-for-important-work-i-mean-it/ http://lemire.me/blog/archives/2014/05/23/you-shouldnt-use-a...
- analog31 11y agoI'm of the same mind about Excel, which is why I don't use it any more. I don't like anything where there are hidden layers of meaning that are easy to overlook. I like Jupyter because everything is right there in front of you. Another shortcoming of spreadsheets is that they don't solve what I consider to be the Fundamental Problem of Programming: How to keep your sanity when your project gets bigger than one screen or one page. Of course programmers have lots of ways to deal with this, by creating named abstractions, subroutines, and so forth. It's why we can write million line programs today. But how it's solved in Excel seems incredibly clumsy by comparison. Of course you can adopt the conventions of programming by using Visual Basic, but that seems to occur quite rarely.
- analog31 11y agoI use Jupyter as a lab notebook, and it's OK to enter data by hand in an array literal, paste it from a spreadsheet (it comes in as tab delimited text, which is easy to mung) or read it from a text file. But an edit-able tabular data array (that was also accessible programmatically) would be really super.
- calebm 11y ago+1 for good spreadsheet functionality in Jupyter!
- misiti3780 11y agoif i understand you correctly - you can - like this: import pandas as pd df = pd.DataFrame() ...loads data... def modify_column(x): """ modify x"""" return modified_x df['column_name'].apply(lambda x: modify_column(x))