Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle missing values in data? #109

Open
dmastrovito opened this issue Jan 4, 2022 · 0 comments
Open

How to handle missing values in data? #109

dmastrovito opened this issue Jan 4, 2022 · 0 comments

Comments

@dmastrovito
Copy link

Hello, I am uncertain how to properly specify missing continuous data in my pandas data frame for use by pycausal search. Specifically, if I am trying to search over multiple data sets and some data sets do not have values for some variables. Is this possible? I have tried numpy.nan, "?", "*" as well as empty pandas.Series

I receive an error like:

Exception in thread "Thread-0" edu.pitt.dbmi.data.reader.DataReaderException: Insufficient data on line 2. Extracted 35 value(s) but expected 44.
at edu.pitt.dbmi.data.reader.tabular.TabularDataFileReader.determineDiscreteDataColumns(TabularDataFileReader.java:178)
at edu.pitt.dbmi.data.reader.tabular.MixedTabularDatasetFileReader.readInData(MixedTabularDatasetFileReader.java:74)
at edu.pitt.dbmi.data.reader.tabular.MixedTabularDatasetFileReader.readInData(MixedTabularDatasetFileReader.java:55)
Traceback (most recent call last):
File "", line 1, in
File "/home/dana.mastrovito/.conda/envs/pytorch1.7.0/lib/python3.8/site-packages/pycausal/search.py", line 250, in run
dataset = pc.loadMixedData(df, numCategoriesToDiscretize)
File "/home/dana.mastrovito/.conda/envs/pytorch1.7.0/lib/python3.8/site-packages/pycausal/pycausal.py", line 128, in loadMixedData
tetradData = dataReader.readInData()
File "/home/dana.mastrovito/.conda/envs/pytorch1.7.0/lib/python3.8/site-packages/javabridge/wrappers.py", line 69, in
fn = lambda naame=name: lambda *args: self.__call(naame, *args)
File "/home/dana.mastrovito/.conda/envs/pytorch1.7.0/lib/python3.8/site-packages/javabridge/wrappers.py", line 155, in __call
result = J.call(self.o, method_name, msig, *cargs)
File "/home/dana.mastrovito/.conda/envs/pytorch1.7.0/lib/python3.8/site-packages/javabridge/jutil.py", line 892, in call
result = fn(*nice_args)
File "/home/dana.mastrovito/.conda/envs/pytorch1.7.0/lib/python3.8/site-packages/javabridge/jutil.py", line 859, in fn
raise JavaException(x)
javabridge.jutil.JavaException: Insufficient data on line 2. Extracted 35 value(s) but expected 44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant