You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rowkeys can be initialized only if there is an existing column with those values. Then, those values are copied to an indexing dictionary to create the lookup mechanism. There is no means to create a rowkeys lookup dict without an existing column of values.
Problem:
Transposing daf object would require the creation of a new column to maintain column keys and create the keyfield and kd.
It may be desirable to keep rowkeys separated from the data rows, so the entire row can be used in calculations, such as sum().
structure is currently not symmetrical, so it is not possible to treat rows as columns. Treating rows as if they are columns means they can be processed using conventional list-oriented functions, such as sum().
Proposed:
Create method to initialize kd dict without an existing column.
if kd == {} and keyfield == '': then no kd is created.
if keyfield, then initialize kd from that column. keyfield != '' and kd != {}.
kd can be initialized from any list, even if keyfield == '' using daf.set_rowkeys(keylist) method
This will initialize kd as a indexing dict.
create error if the keylist has any duplicative values or cannot be hashed.
kd != {} and keyfield == '' indicates this situation.
update other cases when the kd is rebuilt. Can't be rebuilt in the same way if keyfield == ''.
When transpose or "flip" is indicated when columns are selected, then:
column names are used as rowkey values and kd is built without a corresponding keyfield column.
if rowkey values exist prior to flipping, then those will be used as column names.
The text was updated successfully, but these errors were encountered:
Current:
rowkeys can be initialized only if there is an existing column with those values. Then, those values are copied to an indexing dictionary to create the lookup mechanism. There is no means to create a rowkeys lookup dict without an existing column of values.
Problem:
Proposed:
Create method to initialize kd dict without an existing column.
The text was updated successfully, but these errors were encountered: