Forum Discussion
JosueMolina
2 years agoHelper III
Fabric Notebook Locale Setting
I was able to run this code: locale.setlocale(locale.LC_TIME,"es_ES") before. But now the locale string is unsupported. Is there any way I can change the locale for a Notebook session. This help...
HimanshuS-msft
2 years agoMicrosoft Employee
Hello JosueMolina
Sorry for the late reply .
If the requirement is to set locale to handle local timezone then yes. You can set timezone at session level by changing the Spark Config "
spark.sql.session.timeZone" or using SparkSQL SET command -
SET TIME ZONE - Spark 3.4.0 Documentation (apache.org)
Thanks
Himanshu
JosueMolina
2 years agoHelper III
Hi HimanshuS-msft
Sadly, this doesn't work as the purpose of changing the locale is to use pandas or pandas on Spark to create a Calendar with the proper Weekday names and Month names in Spanish without resorting to a replace as we add more variations of these names.
df['date'].dt.strftime("%a")