Quantipy / quantipy

Python for people data
MIT License
66 stars 14 forks source link

DataSet.crosstab should support lists #1216

Open jamesrkg opened 5 years ago

jamesrkg commented 5 years ago

Any of these should be possible via auto-pd.concat:

dataset.crosstab(['q1', 'q2'], 'q3') dataset.crosstab('q1', ['q2', 'q3']) dataset.crosstab(['q1', 'q2'], ['q3', 'q4'])

nitsrek commented 5 years ago

additionally a few new features are added (like adding stats + sigs)

jamesrkg commented 5 years ago

ALL THE THINGS!

nitsrek commented 5 years ago

tests are failing for chains. need to check next week!

nitsrek commented 5 years ago

to get all old functionalities, rbase is needed (draft for ViewManager regarding rbase is added). ChainManager does not support rbase yet, Chain.get() does not merge the frames properly. @alextanski can we have a look together?

nitsrek commented 5 years ago

@alextanski branch i1216_dataset_crosstab is up-to-date

DataSet.crosstab2() is my new crosstab version, which currently ignores rbase

ViewManager.set_bases() is updated, so it takes rbase into account if requested

Segweigh commented 5 years ago

I'm a big user of DataSet.crosstab I really like it. I second the request about, it would be good to have the option to hide rbase, but also to show weighted and unwieghted rbase counts (even on % crosstabs)

Havlin commented 5 years ago

Sorry I'm a little confuesed by the thread. Are people saying that their currently is a way to do lists in cross-tabs (like in Pandas) or are they saying that their should be in the future? If it's currently possible could someone provide me with some additional guidance?

nitsrek commented 5 years ago

@Havlin in the current master or develop version crosstab does not support lists, but it should be possible in future.

Currently there is a new crosstab method DataSet.crosstab2() in branch i1216_dataset_crosstab, that does support lists, but it's not fully tested and row-bases (which are available in the current method) are not working.

Havlin commented 5 years ago

Thanks @nitsrek . What do you mean by 'row-bases'? Do you mean that it doesn't provide totals in the table?

Also, are there any significant diffirences between i1216 and master other than crosstabs? I have some files on my machine written with a lot of quantipy master and wasn't sure if their might be some semantic errors if I start using all of i1216