Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

masking function pyspark

val df = ss.sparkContext.parallelize( Seq (
  ("c1", "JAN-2017", 49 ),
  ("c1", "MAR-2017", 83),
)).toDF("city", "month", "sales")
df.show()

val mask = udf( (s : String) => {
  "*** Masked ***"
})

df.withColumn("city", mask($"city")).show`
Comment

PREVIOUS NEXT
Code Example
Python :: how to show process bar in terminal python 
Python :: changes not showing on website server odoo 
Python :: python selenium hide log 
Python :: count how many vowels in a string python 
Python :: how to access a private attribute in child class python 
Python :: pyrogram 
Python :: image to array keras 
Python :: python execute bat file 
Python :: split every character python 
Python :: python discord bot wait for response 
Python :: upload multiple files streamlit 
Python :: repeat 10 times python 
Python :: python min length list of strings 
Python :: How to to efficiently find the first index in a sorted array of distinct numbers that is equal to the value at that index? 
Python :: how to do processing on html file using python 
Python :: anova in python 
Python :: calculate the addition of two lists in python 
Python :: python code to get all file names in a folder 
Python :: poetry take the dependencies from requirement.txt 
Python :: how to write a font in pygame 
Python :: splittext py 
Python :: triangle pattern in python 
Python :: delay time python 
Python :: txt file duplicate line remover python 
Python :: pyspark add string to columns name 
Python :: python request example 
Python :: matplotlib bold 
Python :: what is r strip function in python 
Python :: when pyspark 
Python :: read excel sheet in python 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =