Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How to remove Special character “#” from 100 of columns in DataFrame in Spark?
Home
Spark Sql
How to remove Special character “#” from 100 of columns in DataFrame in Spark?
+1
vote
asked
Mar 9, 2020
in
Spark Sql
by
SakshiSharma
How to remove Special character “#” from 100 of columns in DataFrame in Spark?
#spark-dataframe-characters
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Mar 9, 2020
by
rajeshsharma
val columns = “#cust_id|#cust_name| #odr_date| #shipdt| #Courer| #recvd_dt|#returned or not|#returned dt|#reson of return”
.split(‘|’).map(_.stripMargin(‘#’))
valcreateNewDF = createDF.toDF(columns:_*)
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: DataFrame is data organized into ______ columns
asked
Aug 18, 2023
in
Spark Sql
by
GeorgeBell
spark-sql-interview-questions-answers
+1
vote
Q: How to programmatically specifying schema for DataFrame in Spark?
asked
Mar 9, 2020
in
Spark Sql
by
SakshiSharma
#spark-dataframe
+1
vote
Q: How to convert RDD to DataFrame in Spark?
asked
Mar 9, 2020
in
Spark Sql
by
SakshiSharma
#spark-convert-dtaframe
0
votes
Q: How to remove special characters from a string in java?
asked
Oct 21, 2020
in
JAVA
by
rahuljain1
#remove-special-characters
#remove-characters-string
Java-questions-answers
0
votes
Q: What is the difference between a DataFrame and a Dataset in Spark SQL?
asked
Feb 12, 2023
in
Spark Sql
by
sharadyadav1986
dataframe
sparksql
dataset
sql
0
votes
Q: What is a DataFrame in Spark SQL?
asked
Feb 12, 2023
in
Spark Sql
by
sharadyadav1986
dataframe
spark-sql
+1
vote
Q: Take first 10 record and last 10 record of file and combine both using DataFrame in Spark?
asked
Mar 9, 2020
in
Spark Sql
by
SakshiSharma
#spark-frames
0
votes
Q: Difference between RDD and DataFrame in Spark?
asked
Mar 9, 2020
in
Spark Sql
by
SakshiSharma
#spark-rdd
spark-dataframe
+1
vote
Q: Load a csv/textFile and remove header and footer in Spark?
asked
Mar 9, 2020
in
Spark Sql
by
SakshiSharma
#spark-csv-file
0
votes
Q: Write a method that will remove given character from the String?
asked
Mar 16, 2021
in
JAVA
by
Robindeniel
#string-character
java-string
java
Java-questions-answers
...