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

scala problem: df.add("colname", list) never gets used #66

Open
benman1 opened this issue Aug 1, 2017 · 0 comments
Open

scala problem: df.add("colname", list) never gets used #66

benman1 opened this issue Aug 1, 2017 · 0 comments

Comments

@benman1
Copy link

benman1 commented Aug 1, 2017

Hi,
I really like the interface and the possibilities of joinery. I am currently trying out different jvm tools for data manipulation and machine learning. I'd need a REPL for my purpose, and I am using scala, however, I am having some problems using joinery within scala as you can see below.
Please help to make this work.
Cheers!
Ben.

java example (works fine):

List<Double> col1 = new ArrayList<Double>(Arrays.asList(1.0,2.0,3.0,4.0));
List<Double> col2 = new ArrayList<Double>(Arrays.asList(1.0,2.0,3.0,4.0));
DataFrame df = new DataFrame();
df.add("col1", col1);
df.add("col2", col2);
df.show(); // all fine!
System.out.println(df.columns()); // shows column names "col1" and "col2"

scala example (doesn't disambiguate between two methods):

val col1 : util.List[Double] = ArrayBuffer(1.0,2.0,3.0,4.0).asJava
val df = new DataFrame[Double]()
df.add("col1", col1)
//...

Error:(...) ambiguous reference to overloaded definition, both method add in class DataFrame of type (x$1: Any, x$2: java.util.List[Double])joinery.DataFrame[Double] and method add in class DataFrame of type (x$1: Object*)joinery.DataFrame[Double] match argument types (String,java.util.List[Double]) df.add("col1", col1)

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