Skip to content

asishm/excellentpandas

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

excellentpandas

License

Very quickly load pandas DataFrames in Excel

Python is awesome and I love it for doing all sorts of data manipulation. But sometimes Microsoft Excel remains the best place to do quick data exploration and filtering. So thanks to the brilliant xlwings, it's easy to integrate the two. This module has some very simple functions to make this as easy as possible.

Screen capture showing Jupyter Notebook code cells being run with Excel workbooks being loaded in the background

Say you have this script:

>>> df = read_data()
>>> result = df.groupby("blah")[vars].agg(something_complex)

And you want to explore result quickly in Excel.

You can use one of the following functions to immediately launch the DataFrame in a new Excel Workbook on your desktop via a non-blocking call:

show_in_excel(df)

>>> from excellentpandas import show_in_excel
>>> df = read_data()
>>> result = df.groupby("blah")[vars].agg(something_complex)
>>> show_in_excel(result)
>>>

Use .pipe(via_excel) for a chained version

>>> from excellentpandas import via_excel
>>> df = read_data()
>>> result = df.groupby("blah")[vars].agg(something_complex).pipe(via_excel)
>>>

Show info as well with .pipe(via_info_excel)

>>> from excellentpandas import via_info_excel
>>> df = read_data()
>>> result = df.groupby("blah")[vars].agg(something_complex).pipe(via_info_excel)
<class 'pandas.core.frame.DataFrame'>
Int64Index: 16 entries, 2004 to 2019
Data columns (total 6 columns):
...
dtypes: float64(6)
memory usage: 896.0 bytes
>>>

Install

$ pip install -U excellentpandas

About

Very quickly load pandas DataFrames in Excel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%