Pandas Never Use Append

less than 1 minute read

Published:

Never use pandas append https://stackoverflow.com/questions/10715965/add-one-row-to-pandas-dataframe

toArray = udf((lambda value : String) => value.split(“ “).map(_.toString).split(“,”).map(lambda s: s[1]))

parse = udf(lambda s: Vectors.parse(s), VectorUDT())

df = sqlContext.read.format(“org.apache.phoenix.spark”).option(“table”, “"105_TICKETING_METRICS_V1"”).option(“zkUrl”, phoenixURL).load().createOrReplaceTempView(“df”) df1 = sqlContext.sql(“select * from df”)