I want to calculate the frequency distribution(return most common element in each column and the number of times it appeared) of a dataframe using spark and scala. I've tried using DataFrameStatFunctions library but after I filter my dataframe for only numeric type columns, I cant apply any functions from the library. Is the best way to do this to create a UDF?
Add a comment |
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related
Hot Network Questions
- Are Old Methusalah-type Stars in Faraway Galaxies?
- Why does the author use "you almost got us killed" vs "you almost killed us"?
- Children horror story where school students have mouth in their face as well as armpits
- Do you die sooner if you retire later?
- BC547 datasheet, what is this graph used for?
- Applying the Fundamental Theorem of Calculus to Jump Discontinuities
- Missing function in composition of two functions
- What is an ACE! word? (Can't do it without clubs!)
- Question on a calculation in Weisskopf's 1939 paper on the electron self-energy
- Who is the “Anointed Prince” in Daniel 9:25, and how should this figure be understood historically and prophetically?
- Splitting a sentence into characters (incl. spaces) and displaying each character in a tikz node
- How does a spinor field transform under general co-ordinate transforms?
- Why didn’t Yerovam ben Nevat simply make a new temple without cow worship?
- in others' eyes
- Constructing a URL query using URLDownload or URLRead
- French spacing conflicts with cleveref
- Series RLC resonant peak
- What should I do if my foreshadowing was too obvious and readers picked up on it immediately?
- Kepler's third law and conservation of angular momentum: apparent fallacy
- Include endowed chairs/emeritus status in recommender titles for grad apps?
- Is 7 the only "good" prime number?
- Are quantum wavefunctions required to be analytic?
- Is Mtt 23:24 Jesus' counter- statement for Mtt 11:19?
- I'm thinking of quitting my job after a month. How would I explain this to future employers?
lang-scala