I have noticed that a number of Jupyter users call df.head(), df.shape, 
df.describe(), or something similar almost every time they load or 
manipulate a dataframe to inspect what their manipulation did. I would like 
to develop an extension or kernel magic that prints useful information to a 
cell's output based on the pandas function called in that cell. For 
example, running pd.read_csv() might automatically print the shape and 
column names of the loaded dataframe and df.drop_duplicates() might 
automatically print how many duplicates were dropped and how many unique 
rows remain.

How might I architect such an extension (e.g., a JupyterLab extension, an 
iPython kernel magic, or something else)? I think I would need to detect 
when certain pandas functions are about to be run by the kernel and gather 
information about the dataframe immediately before and after execution. 
Would that even be feasible?

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/9e1dfb92-87e0-4a8b-b170-370ab7cfabc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to