<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How can i replace or handle null values in dataframe . in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132147#M47681</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11677/prakashhadoopdev.html" nodeid="11677"&gt;@jayaprakash gadi&lt;/A&gt;  why don't you implement a companion method in Auction class to handle null values.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2016 19:21:15 GMT</pubDate>
    <dc:creator>rajkumar_singh</dc:creator>
    <dc:date>2016-12-01T19:21:15Z</dc:date>
    <item>
      <title>How can i replace or handle null values in dataframe .</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132146#M47680</link>
      <description>&lt;P&gt;val ebayds = sc.textFile("/user/spark/xbox.csv")&lt;/P&gt;&lt;P&gt;case class Auction(auctionid: String, bid: Float, bidtime: Float, bidder: String, bidderrate: Int, openbid: Float, price: Float)&lt;/P&gt;&lt;P&gt;val ebay = ebayds.map(a=&amp;gt;a.split(",")).map(p=&amp;gt;Auction(p(0),p(1).toFloat,p(2).toFloat,p(3),p(4).toInt,p(5).toFloat,p(6).toFloat)).toDF()&lt;/P&gt;&lt;P&gt;ebay.select("auctionid").distinct.count&lt;/P&gt;&lt;P&gt;am getting error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 09:09:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132146#M47680</guid>
      <dc:creator>prakash_hadoopd</dc:creator>
      <dc:date>2016-12-01T09:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can i replace or handle null values in dataframe .</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132147#M47681</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11677/prakashhadoopdev.html" nodeid="11677"&gt;@jayaprakash gadi&lt;/A&gt;  why don't you implement a companion method in Auction class to handle null values.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:21:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132147#M47681</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-12-01T19:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can i replace or handle null values in dataframe .</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132148#M47682</link>
      <description>&lt;P&gt;The error seem to be mismatch data type with data set and case class.Check the each columns data type first &lt;/P&gt;&lt;P&gt;Use csv api to read csv file and print schema &lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;PRE&gt;val ebaydf = sqlcontect.read.format("com.databricks.spark.csv").option("header", "true").option("InferSchema", "true").load(path)

ebaydf.printschema()&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Dec 2016 14:35:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-i-replace-or-handle-null-values-in-dataframe/m-p/132148#M47682</guid>
      <dc:creator>senthilkumarP</dc:creator>
      <dc:date>2016-12-04T14:35:43Z</dc:date>
    </item>
  </channel>
</rss>

