mirror of
https://github.com/KevinMidboe/tableprint.git
synced 2025-10-29 18:00:16 +00:00
Removed README.md dependency in setup.py
This commit is contained in:
14
setup.py
14
setup.py
@@ -1,12 +1,4 @@
|
|||||||
from setuptools import setup, find_packages # Always prefer setuptools over distutils
|
from setuptools import setup, find_packages
|
||||||
from codecs import open # To use a consistent encoding
|
|
||||||
from os import path
|
|
||||||
|
|
||||||
here = path.abspath(path.dirname(__file__))
|
|
||||||
|
|
||||||
# Get the long description from the relevant file
|
|
||||||
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
||||||
long_description = f.read()
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='tableprint',
|
name='tableprint',
|
||||||
@@ -17,7 +9,7 @@ setup(
|
|||||||
version='0.1.2',
|
version='0.1.2',
|
||||||
|
|
||||||
description='Pretty ASCII printing of tabular data',
|
description='Pretty ASCII printing of tabular data',
|
||||||
long_description=long_description,
|
long_description='''Formatted ASCII printing of tabular data''',
|
||||||
|
|
||||||
# The project's main homepage.
|
# The project's main homepage.
|
||||||
url='https://github.com/nirum/tableprint',
|
url='https://github.com/nirum/tableprint',
|
||||||
@@ -65,7 +57,7 @@ setup(
|
|||||||
# project is installed. For an analysis of "install_requires" vs pip's
|
# project is installed. For an analysis of "install_requires" vs pip's
|
||||||
# requirements files see:
|
# requirements files see:
|
||||||
# https://packaging.python.org/en/latest/requirements.html
|
# https://packaging.python.org/en/latest/requirements.html
|
||||||
install_requires=['pandas'],
|
install_requires=['numpy'],
|
||||||
|
|
||||||
# List additional groups of dependencies here (e.g. development dependencies).
|
# List additional groups of dependencies here (e.g. development dependencies).
|
||||||
# You can install these using the following syntax, for example:
|
# You can install these using the following syntax, for example:
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import numpy as np
|
|||||||
__all__ = ['table', 'row', 'header', 'frame']
|
__all__ = ['table', 'row', 'header', 'frame']
|
||||||
|
|
||||||
|
|
||||||
def frame(df, options=None):
|
def frame(dataframe, options=None):
|
||||||
"""
|
"""
|
||||||
Print an ASCII table using the given pandas DataFrame
|
Print an ASCII table using the given pandas DataFrame
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
df : DataFrame
|
dataframe : DataFrame
|
||||||
A pandas DataFrame with consisting of the table to print
|
A pandas DataFrame with consisting of the table to print
|
||||||
|
|
||||||
options : dict
|
options : dict
|
||||||
@@ -31,7 +31,7 @@ def frame(df, options=None):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
table(np.array(df), list(df.columns), options)
|
table(np.array(dataframe), list(df.columns), options)
|
||||||
|
|
||||||
|
|
||||||
def table(data, headers, options=None):
|
def table(data, headers, options=None):
|
||||||
@@ -200,4 +200,4 @@ def hr(ncols, column_width=10, corner_char='+', line_char='-'):
|
|||||||
|
|
||||||
hrstr = corner_char.join([('{:%s^%i}' % (line_char, column_width+2)).format('') for _ in range(ncols)])
|
hrstr = corner_char.join([('{:%s^%i}' % (line_char, column_width+2)).format('') for _ in range(ncols)])
|
||||||
|
|
||||||
return corner_char + hrstr[1:-1] + corner_char
|
return corner_char + hrstr[1:-1] + corner_char
|
||||||
|
|||||||
Reference in New Issue
Block a user