Merge pull request #29 from l0b0/fix/Sequence
fix: Correct reference to `Sequence`
This commit is contained in:
commit
09c35c10df
@ -175,7 +175,7 @@ function.
|
||||
|
||||
import collections
|
||||
...
|
||||
class RideData(collections.Sequence):
|
||||
class RideData(collections.abc.Sequence):
|
||||
def __init__(self):
|
||||
self.routes = [] # Columns
|
||||
self.dates = []
|
||||
@ -204,7 +204,7 @@ into 4 separate `append()` operations.
|
||||
# readrides.py
|
||||
...
|
||||
|
||||
class RideData(collections.Sequence):
|
||||
class RideData(collections.abc.Sequence):
|
||||
def __init__(self):
|
||||
# Each value is a list with all of the values (a column)
|
||||
self.routes = []
|
||||
|
@ -93,7 +93,7 @@ def read_rides_as_columns(filename):
|
||||
# The great "fake"
|
||||
|
||||
import collections
|
||||
class RideData(collections.Sequence):
|
||||
class RideData(collections.abc.Sequence):
|
||||
def __init__(self):
|
||||
# Each value is a list with all of the values (a column)
|
||||
self.routes = []
|
||||
|
@ -88,7 +88,7 @@ def read_rides_as_columns(filename):
|
||||
# The great "fake"
|
||||
|
||||
import collections
|
||||
class RideData(collections.Sequence):
|
||||
class RideData(collections.abc.Sequence):
|
||||
def __init__(self):
|
||||
# Each value is a list with all of the values (a column)
|
||||
self.routes = []
|
||||
|
@ -3,7 +3,7 @@
|
||||
import collections
|
||||
import csv
|
||||
|
||||
class DataCollection(collections.Sequence):
|
||||
class DataCollection(collections.abc.Sequence):
|
||||
def __init__(self, columns):
|
||||
self.column_names = list(columns)
|
||||
self.column_data = list(columns.values())
|
||||
@ -34,4 +34,3 @@ if __name__ == '__main__':
|
||||
tracemalloc.start()
|
||||
data = read_csv_as_columns('../../Data/ctabus.csv', [intern, intern, intern, int])
|
||||
print(tracemalloc.get_traced_memory())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user