Databricks- Camel to Snake Case by using Scala

Ryan Arjun
3 min readFeb 24, 2024

In this tutorial, you will learn “How to change column names from CamelCase to Snake Case in a dataframe by using Scala” in Databricks.

💡Imagine we have an input Dataframe (as in the image). Our goal is to achieve the desired output Dataframe (also in the image).

Basically, you have to change the names of column as follows-
Age -> Age ,

--

--

Ryan Arjun

BI Specialist || Azure || AWS || GCP — SQL|Python|PySpark — Talend, Alteryx, SSIS — PowerBI, Tableau, SSRS