I have loaded one csv file into my spark dataframe, after that if I try to calculate using approxQuantile
method which is giving me an error. Tried with different data set and different columns, probablibities, and relativeError. Help me out understanding what's going on.
df.approxQuantile("column_name", [0.2,0.3,0.6,1.0], 0)
I am getting the following error :
py4j.protocol.Py4JError: An error occurred while calling o30.approxQuantile. Trace: py4j.Py4JException: Method approxQuantile([class scala.collection.immutable.$colon$colon, class scala.collection.immutable.$colon$colon, class java.lang.Double]) does not exist at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318) at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326) at py4j.Gateway.invoke(Gateway.java:272) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:214) at java.lang.Thread.run(Thread.java:745)
df.printSchema()
)? – MaFF