Databricks Community

I'm trying this code but getting the following error

testDF = (eventsDF
          .groupBy("user_id")
          .pivot("event_name")
          .count("event_name"))

TypeError : _api() takes 1 positional argument but 2 were given

Please guide how to fix the error

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group ! If there isn’t one near you, fill out this form and we’ll create one for you to join!

Pyspark custom Transformer class -AttributeError: 'DummyMod' object has no attribute 'MyTransformer' in Machine Learning DLT fails with Queries with streaming sources must be executed with writeStream.start(); in Data Engineering Cannot pass arrays to spark.sql() using named parameter markers in Data Engineering Pandas_UDF not working on shared access mode but works on personal cluster in Data Engineering How to write data to Confluent Kafka with SchemaRegistry format on sparkstructured? in Data Engineering © Databricks 2024. All rights reserved. Apache, Apache Spark, Spark and the Spark logo are trademarks of the Apache Software Foundation.
  • Privacy Notice
  • Terms of Use
  • Your Privacy Choices
  • Your California Privacy Rights
  •