nirum / tableprint

Pretty console printing :clipboard: of tabular data in python :snake:
https://tableprint.readthedocs.io/
MIT License
174 stars 16 forks source link

Drop Numpy as a hard requirement #8

Closed nicktimko closed 6 years ago

nicktimko commented 6 years ago

Including Numpy as a necessary requirement is extremely heavy for a terminal printer. It seems like you just use it to convert a dataframe to an array and to do a floor function on a scalar(!). The latter can be easily replicated through math.floor in the stdlib, and for the former, you could attempt to import Numpy if it exists inside the dataframe function (if someone's giving you a Pandas dataframe you know there'll be Numpy).

nirum commented 6 years ago

This is a really great suggestion! I made the fix in #9.