From c9a6c5b6758f50c054781be37e6068b87a74ba48 Mon Sep 17 00:00:00 2001 From: insomniac Date: Sat, 17 Sep 2016 11:38:21 +0100 Subject: [PATCH] Pandas not mandatory anymore; moved pandas import only when needed --- dublintraceroute/tracerouteresults.py | 6 +++++- requirements.txt | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dublintraceroute/tracerouteresults.py b/dublintraceroute/tracerouteresults.py index 1f0f725..dc6c506 100644 --- a/dublintraceroute/tracerouteresults.py +++ b/dublintraceroute/tracerouteresults.py @@ -1,4 +1,3 @@ -import pandas import tabulate @@ -44,6 +43,11 @@ def flatten(self): return rows def to_dataframe(self): + ''' + Convert traceroute results to a Pandas DataFrame. + ''' + # pandas is imported late because it does not compile yet on PyPy + import pandas return pandas.DataFrame(self.flatten()) def pretty_print(self): diff --git a/requirements.txt b/requirements.txt index 6b1db2a..6c49271 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,2 @@ pygraphviz tabulate -numpy -pandas