Commit 937c9239 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Update colmap when columns are added/removed

parent d7b7de94
......@@ -11,7 +11,6 @@ class which holds a reference to the loaded data.
import itertools as it
import multiprocessing.dummy as mpd
import copy
import logging
import contextlib
import collections
......@@ -386,6 +385,8 @@ class DataTable:
vcols = self.__varmap[col.vid]
vcols.remove(col)
self.__colmap.pop(col.name)
if len(vcols) > 0: self.__varmap[col.vid] = vcols
else: self.__varmap.pop(col.vid)
......@@ -429,7 +430,9 @@ class DataTable:
startvid = startvid + 1
col = Column(None, s.name, idx, vid, 0, 0, m)
self.__data[s.name] = s
self.__data[ s.name] = s
self.__colmap[s.name] = col
# new column on existing variable.
# We assume the data type is the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment