├── .gitignore ├── .travis.yml ├── LICENSE ├── MANIFEST.in ├── README.md ├── README.rst ├── excelify ├── __init__.py ├── excelify.py └── tests.py ├── setup.cfg └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | .static_storage/ 56 | .media/ 57 | local_settings.py 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | # pytest cache 107 | .pytest_chache/ 108 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | matrix: 3 | include: 4 | - python: 3.6 5 | - python: 3.5 6 | install: 7 | - sudo apt-get update 8 | - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh 9 | - bash miniconda.sh -b -p $HOME/miniconda 10 | - export PATH="$HOME/miniconda/bin:$PATH" 11 | - hash -r 12 | - conda config --set always_yes yes --set changeps1 no 13 | - conda update -q conda 14 | - conda info -a 15 | - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION ipython pandas xlrd XlsxWriter pytest pytest-cov 16 | - source activate test-environment 17 | - conda install -c conda-forge codecov 18 | - python setup.py install 19 | script: 20 | - pytest excelify/tests.py --cov=./ 21 | after_success: 22 | - codecov -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Peter Baumgartner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.rst 2 | include *.py 3 | include tox.ini 4 | include Makefile 5 | include .gitignore 6 | include .travis.yml 7 | include appveyor.yml 8 | include .coveragerc 9 | include LICENSE 10 | include *.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Excelify 2 | 3 | Easily export `pandas` objects to Excel spreadsheets with IPython magic. 4 | 5 | [![Build Status](https://travis-ci.org/pmbaumgartner/excelify.svg?branch=master)](https://travis-ci.org/pmbaumgartner/excelify) [![codecov](https://codecov.io/gh/pmbaumgartner/excelify/branch/master/graph/badge.svg)](https://codecov.io/gh/pmbaumgartner/excelify) 6 | 7 | ## Install 8 | 9 | `pip install excelify` 10 | 11 | or 12 | 13 | `pip install https://github.com/pmbaumgartner/excelify/releases/download/v0.4/excelify-0.4.tar.gz` 14 | 15 | then: 16 | 17 | `%load_ext excelify` 18 | 19 | 20 | ## Example 21 | 22 | ### `%excel` 23 | ```python 24 | %load_ext excelify 25 | 26 | data = [ 27 | {'name' : 'Greg', 'age' : 30}, 28 | {'name' : 'Alice', 'age' : 36} 29 | ] 30 | df = pd.DataFrame(data) 31 | 32 | %excel df -f spreadsheet.xlsx -s sample_data 33 | ``` 34 | 35 | ## Magics 36 | 37 | ### `%excel` 38 | 39 | ``` 40 | %excel [-f FILEPATH] [-s SHEETNAME] dataframe 41 | 42 | Saves a DataFrame or Series to Excel 43 | 44 | positional arguments: 45 | dataframe DataFrame or Series to Save 46 | 47 | optional arguments: 48 | -f FILEPATH, --filepath FILEPATH 49 | Filepath to Excel spreadsheet.Default: 50 | './{object}_{timestamp}.xlsx' 51 | -s SHEETNAME, --sheetname SHEETNAME 52 | Sheet name to output data.Default: 53 | {object}_{timestamp} 54 | 55 | ``` 56 | 57 | ### `%excel_all` 58 | 59 | ``` 60 | %excel_all [-f FILEPATH] [-n NOSORT] 61 | 62 | Saves all Series or DataFrame objects in the namespace to Excel. 63 | Use at your own peril. Will not allow more than 100 objects. 64 | 65 | optional arguments: 66 | -f FILEPATH, --filepath FILEPATH 67 | Filepath to excel spreadsheet.Default: 68 | './all_data_{timestamp}.xlsx' 69 | -n NOSORT, --nosort NOSORT 70 | Turns off alphabetical sorting of objects for export 71 | to sheets 72 | ``` 73 | 74 | ## Dependencies 75 | 76 | - IPython 77 | - Pandas 78 | - XlsxWriter 79 | ## Why? 80 | 81 | I had several Jupyter notebooks that were outputting crosstabs or summary statistics that would eventually end up in a Word doc. Depending on the size and complexity of the table, I would either copy/paste or export to Excel. Due to the inconsistency, this made managing all these tables a pain. I figured a tool like this would make it easier to collect everything in a notebook as part of an analysis into one excel file, deal with formatting in excel, and review and insert into a doc from there. -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Excelify 2 | ======== 3 | 4 | Easily export ``pandas`` objects to Excel spreadsheets with IPython 5 | magic. 6 | 7 | |Build Status| |codecov| 8 | 9 | Example 10 | ------- 11 | 12 | ``%excel`` 13 | ~~~~~~~~~~ 14 | 15 | .. code:: python 16 | 17 | %load_ext excelify 18 | 19 | data = [ 20 | {'name' : 'Greg', 'age' : 30}, 21 | {'name' : 'Alice', 'age' : 36} 22 | ] 23 | df = pd.DataFrame(data) 24 | 25 | %excel df -f spreadsheet.xlsx -s sample_data 26 | 27 | Magics 28 | ------ 29 | 30 | ``%excel`` 31 | ~~~~~~~~~~ 32 | 33 | :: 34 | 35 | %excel [-f FILEPATH] [-s SHEETNAME] dataframe 36 | 37 | Saves a DataFrame or Series to Excel 38 | 39 | positional arguments: 40 | dataframe DataFrame or Series to Save 41 | 42 | optional arguments: 43 | -f FILEPATH, --filepath FILEPATH 44 | Filepath to Excel spreadsheet.Default: 45 | './{object}_{timestamp}.xlsx' 46 | -s SHEETNAME, --sheetname SHEETNAME 47 | Sheet name to output data.Default: 48 | {object}_{timestamp} 49 | 50 | ``%excel_all`` 51 | ~~~~~~~~~~~~~~ 52 | 53 | :: 54 | 55 | %excel_all [-f FILEPATH] [-n NOSORT] 56 | 57 | Saves all Series or DataFrame objects in the namespace to Excel. 58 | Use at your own peril. Will not allow more than 100 objects. 59 | 60 | optional arguments: 61 | -f FILEPATH, --filepath FILEPATH 62 | Filepath to excel spreadsheet.Default: 63 | './all_data_{timestamp}.xlsx' 64 | -n NOSORT, --nosort NOSORT 65 | Turns off alphabetical sorting of objects for export 66 | to sheets 67 | 68 | Dependencies 69 | ------------ 70 | 71 | - IPython 72 | - Pandas 73 | - XlsxWriter ## Why? 74 | 75 | I had several Jupyter notebooks that were outputting crosstabs or 76 | summary statistics that would eventually end up in a Word doc. Depending 77 | on the size and complexity of the table, I would either copy/paste or 78 | export to Excel. Due to the inconsistency, this made managing all these 79 | tables a pain. I figured a tool like this would make it easier to 80 | collect everything in a notebook as part of an analysis into one excel 81 | file, deal with formatting in excel, and review and insert into a doc 82 | from there. 83 | 84 | .. |Build Status| image:: https://travis-ci.org/pmbaumgartner/excelify.svg?branch=master 85 | :target: https://travis-ci.org/pmbaumgartner/excelify 86 | .. |codecov| image:: https://codecov.io/gh/pmbaumgartner/excelify/branch/master/graph/badge.svg 87 | :target: https://codecov.io/gh/pmbaumgartner/excelify 88 | -------------------------------------------------------------------------------- /excelify/__init__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from excelify.excelify import * 3 | 4 | __all__ = ['excelify'] -------------------------------------------------------------------------------- /excelify/excelify.py: -------------------------------------------------------------------------------- 1 | """ 2 | IPython magic function to save pandas objects to excel 3 | """ 4 | 5 | from time import strftime 6 | from time import time 7 | import datetime 8 | import warnings 9 | 10 | from pandas.core.frame import DataFrame 11 | from pandas.core.series import Series 12 | from pandas import ExcelWriter 13 | 14 | from IPython.core.magic import needs_local_scope 15 | from IPython.core.magic_arguments import (argument, magic_arguments, parse_argstring) 16 | 17 | 18 | @magic_arguments() 19 | @argument('dataframe', help='DataFrame or Series to Save') 20 | @argument( 21 | '-f', 22 | '--filepath', 23 | help='Filepath to Excel spreadsheet.' 24 | "Default: './{object}_{timestamp}.xlsx'") 25 | @argument( 26 | '-s', 27 | '--sheetname', 28 | type=str, 29 | help='Sheet name to output data.' 30 | 'Default: {object}_{timestamp}') 31 | @needs_local_scope 32 | def excel(string, local_ns=None): 33 | '''Saves a DataFrame or Series to Excel''' 34 | args = parse_argstring(excel, string) 35 | 36 | try: 37 | dataframe = local_ns[args.dataframe] 38 | except KeyError: 39 | raise NameError("name '{}' is not defined".format(args.dataframe)) 40 | 41 | if not (isinstance(dataframe, DataFrame) or isinstance(dataframe, Series)): 42 | raise TypeError("Object must be pandas Series or DataFrame." 43 | "Object passed is: {}".format(type(dataframe))) 44 | 45 | if not args.filepath: 46 | filepath = args.dataframe + "_" + datetime.datetime.now().strftime( 47 | "%Y%m%d-%H%M%S") + '.xlsx' 48 | else: 49 | filepath = args.filepath 50 | if filepath[-5:] != '.xlsx': 51 | filepath += '.xlsx' 52 | 53 | if not args.sheetname: 54 | if len(args.dataframe) > 15: 55 | object_name = args.dataframe[:15] 56 | warnings.warn('{} was truncated to {} to fit sheet name length limit'.format( 57 | args.dataframe, object_name)) 58 | else: 59 | object_name = args.dataframe 60 | sheetname = object_name + "_" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") 61 | else: 62 | if len(args.sheetname) > 31: 63 | object_name = args.sheetname[:31] 64 | warnings.warn('Sheet Name {} was truncated to {} to fit sheet name length limit'.format( 65 | args.dataframe, object_name)) 66 | else: 67 | object_name = args.sheetname 68 | sheetname = object_name 69 | 70 | writer = ExcelWriter(filepath, engine='xlsxwriter') 71 | dataframe.to_excel(writer, sheet_name=sheetname) 72 | writer.save() 73 | 74 | print("'{dataframe}' saved to '{filepath}' on sheet '{sheetname}'".format( 75 | dataframe=args.dataframe, filepath=filepath, sheetname=sheetname)) 76 | 77 | 78 | @magic_arguments() 79 | @argument( 80 | '-f', 81 | '--filepath', 82 | help=u'Filepath to excel spreadsheet.' 83 | "Default: './all_data_{timestamp}.xlsx'") 84 | @argument('-n', '--nosort', help=u'Turns off alphabetical sorting of objects for export to sheets') 85 | @needs_local_scope 86 | def excel_all(string, local_ns=None): 87 | ''' 88 | Saves all Series or DataFrame objects in the namespace to Excel. 89 | Use at your own peril. Will not allow more than 100 objects. 90 | ''' 91 | 92 | args = parse_argstring(excel_all, string) 93 | 94 | pandas_objects = [(name, obj) for (name, obj) in local_ns.items() 95 | if isinstance(obj, (DataFrame, Series))] 96 | 97 | check_names = any((len(name) > 31 for (name, obj) in pandas_objects)) 98 | 99 | if check_names: 100 | pandas_objects_truncated = [] 101 | truncated_objects = [] 102 | for (name, obj) in pandas_objects: 103 | if len(name) > 31: 104 | truncated_objects.append((name, name[:31])) 105 | pandas_objects_truncated.append((name[:31], obj)) 106 | pandas_objects = pandas_objects_truncated 107 | warnings.warn('{} objects had their names truncated to fit sheet name length'.format( 108 | len(truncated_objects))) 109 | 110 | if len(pandas_objects) == 0: 111 | raise RuntimeError("No pandas objects in local namespace.") 112 | if len(pandas_objects) > 100: 113 | raise RuntimeError("Over 100 pandas objects in local namespace.") 114 | 115 | pandas_objects = sorted(pandas_objects, key=lambda x: x[0]) 116 | 117 | if not args.filepath: 118 | filepath = "all_data_" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") + '.xlsx' 119 | else: 120 | filepath = args.filepath 121 | if filepath[-5:] != '.xlsx': 122 | filepath += '.xlsx' 123 | 124 | writer = ExcelWriter(filepath, engine='xlsxwriter') 125 | for (name, obj) in pandas_objects: 126 | obj.to_excel(writer, sheet_name=name) 127 | writer.save() 128 | 129 | n_objects = len(pandas_objects) 130 | 131 | print("{n_objects} objects saved to '{filepath}'".format( 132 | n_objects=n_objects, filepath=filepath)) 133 | 134 | 135 | def load_ipython_extension(ipython): 136 | ipython.register_magic_function(excel) 137 | ipython.register_magic_function(excel_all) -------------------------------------------------------------------------------- /excelify/tests.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import tempfile 3 | import pathlib 4 | import datetime 5 | import warnings 6 | 7 | from IPython.testing.globalipapp import start_ipython, get_ipython 8 | 9 | import pandas.util.testing as tm 10 | from pandas.core.frame import DataFrame 11 | from pandas.core.series import Series 12 | from pandas import read_excel 13 | 14 | import pytest 15 | 16 | ip = get_ipython() 17 | ip.magic('load_ext excelify') 18 | 19 | class TestMagicExportImport(unittest.TestCase): 20 | 21 | def setUp(self): 22 | self.tempexcel = tempfile.NamedTemporaryFile(suffix='.xlsx') 23 | 24 | def test_series(self): 25 | series = Series() 26 | excel_name = self.tempexcel.name 27 | ip.run_line_magic('excel', 'series -f {filepath}'.format(filepath=excel_name)) 28 | loaded_series = read_excel(excel_name, squeeze=True, dtype=series.dtype) 29 | tm.assert_series_equal(series, loaded_series, check_names=False) 30 | 31 | def test_dataframe(self): 32 | df = DataFrame() 33 | excel_name = self.tempexcel.name 34 | ip.run_line_magic('excel', 'df -f {filepath}'.format(filepath=excel_name)) 35 | loaded_df = read_excel(excel_name, dtype=df.dtypes) 36 | tm.assert_frame_equal(df, loaded_df, check_names=False) 37 | 38 | def test_sheet_name(self): 39 | series = Series() 40 | excel_name = self.tempexcel.name 41 | sheetname = 'test_sheet_name' 42 | ip.run_line_magic('excel', 'series -f {filepath} -s {sheetname}'.format(filepath=excel_name, sheetname=sheetname)) 43 | loaded_excel = read_excel(excel_name, sheet_name=None) 44 | assert 'test_sheet_name' in loaded_excel 45 | 46 | def test_all_pandas_objects(self): 47 | df1 = DataFrame() 48 | df2 = DataFrame() 49 | series1 = Series() 50 | series2 = Series() 51 | pandas_objects = [(name, obj) for (name, obj) in locals().items() 52 | if isinstance(obj, (DataFrame, Series))] 53 | excel_name = self.tempexcel.name 54 | ip.run_line_magic('excel_all', '-f {filepath}'.format(filepath=excel_name)) 55 | for (name, obj) in pandas_objects: 56 | if isinstance(obj, Series): 57 | loaded_data = read_excel(excel_name, sheet_name=name, squeeze=True, dtype=obj.dtype) 58 | tm.assert_series_equal(obj, loaded_data, check_names=False) 59 | elif isinstance(obj, DataFrame): 60 | loaded_data = read_excel(excel_name, sheet_name=name, dtype=obj.dtypes) 61 | tm.assert_frame_equal(obj, loaded_data, check_names=False) 62 | 63 | def test_sheet_timestamp(self): 64 | series = Series() 65 | excel_name = self.tempexcel.name 66 | ip.run_line_magic('excel', 'series -f {filepath}'.format(filepath=excel_name)) 67 | loaded_excel = read_excel(excel_name, sheet_name=None) 68 | sheet_names = list(loaded_excel.keys()) 69 | for sheet in sheet_names: 70 | _, date_string = sheet.split('_') 71 | saved_date = datetime.datetime.strptime(date_string, "%Y%m%d-%H%M%S") 72 | load_to_read = datetime.datetime.now() - saved_date 73 | # there is probably a better way to test this 74 | assert load_to_read.seconds < 10 75 | 76 | def test_all_long_name(self): 77 | with warnings.catch_warnings(record=True) as w: 78 | warnings.simplefilter("always") 79 | locals().update({'a' * 33 : Series()}) 80 | excel_name = self.tempexcel.name 81 | ip.run_line_magic('excel_all', '-f {filepath}'.format(filepath=excel_name)) 82 | assert len(w) == 1 83 | assert issubclass(w[-1].category, UserWarning) 84 | assert "truncated" in str(w[-1].message) 85 | 86 | def test_long_name_provided(self): 87 | with warnings.catch_warnings(record=True) as w: 88 | series = Series() 89 | excel_name = self.tempexcel.name 90 | longsheet = 'a' * 33 91 | ip.run_line_magic('excel', 'series -f {filepath} -s {longsheet}'.format(filepath=excel_name, longsheet=longsheet)) 92 | assert len(w) == 1 93 | assert issubclass(w[-1].category, UserWarning) 94 | assert "truncated" in str(w[-1].message) 95 | 96 | def test_long_name_default(self): 97 | with warnings.catch_warnings(record=True) as w: 98 | warnings.simplefilter("always") 99 | longsheet = 'a' * 33 100 | locals().update({longsheet : Series()}) 101 | excel_name = self.tempexcel.name 102 | ip.run_line_magic('excel', '{longsheet} -f {filepath}'.format(longsheet=longsheet, filepath=excel_name)) 103 | assert len(w) == 1 104 | assert issubclass(w[-1].category, UserWarning) 105 | assert "truncated" in str(w[-1].message) 106 | 107 | def tearDown(self): 108 | self.tempexcel.close() 109 | 110 | 111 | def test_filename(): 112 | series = Series() 113 | ip.run_line_magic('excel', 'series') 114 | excel_name = list(pathlib.Path().glob('series_*.xlsx'))[0] 115 | assert excel_name.exists() 116 | excel_name.unlink() 117 | 118 | def test_all_filename(): 119 | series = Series() 120 | df = DataFrame() 121 | ip.run_line_magic('excel_all', '') 122 | excel_name = list(pathlib.Path().glob('all_data_*.xlsx'))[0] 123 | assert excel_name.exists() 124 | excel_name.unlink() 125 | 126 | 127 | @pytest.fixture 128 | def no_extension_file(): 129 | file = tempfile.NamedTemporaryFile() 130 | yield file 131 | file.close() 132 | 133 | def test_filepath_append(no_extension_file): 134 | series = Series() 135 | excel_name = no_extension_file.name 136 | ip.run_line_magic('excel', 'series -f {filepath}'.format(filepath=excel_name)) 137 | exported_filepath = pathlib.PurePath(excel_name + '.xlsx') 138 | assert exported_filepath.suffix == '.xlsx' 139 | 140 | def test_all_filepath_append(no_extension_file): 141 | series = Series() 142 | df = DataFrame() 143 | excel_name = no_extension_file.name 144 | ip.run_line_magic('excel_all', '-f {filepath}'.format(filepath=excel_name)) 145 | exported_filepath = pathlib.Path(excel_name + '.xlsx') 146 | exported_filepath = pathlib.PurePath(excel_name + '.xlsx') 147 | assert exported_filepath.suffix == '.xlsx' 148 | 149 | def test_no_object(): 150 | with pytest.raises(NameError): 151 | ip.run_line_magic('excel', 'nonexistantobject') 152 | 153 | def test_non_pandas_object(): 154 | integer = 3 155 | with pytest.raises(TypeError): 156 | ip.run_line_magic('excel', 'integer') 157 | 158 | string = 'string' 159 | with pytest.raises(TypeError): 160 | ip.run_line_magic('excel', 'string') 161 | 162 | def test_all_no_objects(): 163 | with pytest.raises(RuntimeError): 164 | ip.run_line_magic('excel_all', '') 165 | 166 | def test_all_too_many_objects(): 167 | # this seems like a bad idea... 168 | for i in range(102): 169 | locals().update({'series' + str(i) : Series()}) 170 | with pytest.raises(RuntimeError): 171 | ip.run_line_magic('excel_all', '') 172 | 173 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | license_file = LICENSE -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | import os 3 | import excelify 4 | 5 | VERSION = 0.4 6 | 7 | setup( 8 | name='excelify', 9 | version=VERSION, 10 | license='MIT', 11 | description=('IPython magic function to export pandas objects to excel'), 12 | author='Peter Baumgartner', 13 | author_email='petermbaumgartner@gmail.com', 14 | url='https://github.com/pbaumgartner/excelify', 15 | packages=find_packages(exclude=[]), 16 | install_requires=['ipython', 'pandas', 'XlsxWriter', 'xlrd'], 17 | include_package_data=True 18 | ) --------------------------------------------------------------------------------