pyspark dataframe drop null - how to drop row with null values

pyspark dataframe drop null - how to drop row with null values

Hi,

I have a data frame with following values:

Name,address,age

I want to drop all the rows having address is NULL.

how to do this?

thanks

View Answers

August 19, 2019 at 12:10 AM

Hi,

you can use filter to filter out records.

Here is example:

df1 = df.filter("where address is not NULL")

Thanks

Ads









Related Tutorials/Questions & Answers:
Get values in drop down list
Get values in drop down list  Pls provide me jsp code to get values in drop down list from another table's field. my project has customer... in drop down box in front end..... pls provide me code.. thanx
Add values of drop down menu( select option) to mysql table
Add values of drop down menu( select option) to mysql table   Here is my code <?php echo $row['valveName'].'<td>'.$row...($query_auto) or die(mysql_error());42 but $change has a null value
Advertisements
want to insert values in drop down menu in struts1.3
want to insert values in drop down menu in struts1.3  I am using DynaValidatorForm.please help me with inserting values in color drop down menu. I have tried belowwith arraylist but was not able to find solution. add.jspx
SQL NOT NULL Constraint
NULL values. This specify that NOT NULL Constraint enforce the field to accept...; and "Stu_Class" column not to accept NULL values. The insert... SQL NOT NULL Constraint     
Passing java variables from JSP to Servlet - return null values
from JSP to servlet gives null values. I got msg=null. Is there another way...Passing java variables from JSP to Servlet - return null values  I... != null){ dispatcher.forward(request, response); } In MyServlet.java I have included
null pointer
null pointer  dear sir , what is mean by null pointer in c
PHP SQL Null
; This example describes about handling NULL values in sql query in php. The result produced by SQL SELECT command may contain NULL or non-Null values. So when we need to work on these values then the NULL values may not work
Drop Box
Drop Box  program draw 2d shapes in java
Drop Box
Drop Box  program draw 2d shapes in java
null interface
null interface   what is the null interface and what is the use of it in real java project ?   Hi Friend, A null interface is an interface without any methods.Is also known as Marker interface. Null interfaces are used
Mysql Alter Not Null
Mysql Alter Not Null       Mysql Alter Not Null is used to perform when we want records of a table have mandatory values or not to be remain Null. Understand with Example
Why the null values are stored in Database when I am sending proper values?
Why the null values are stored in Database when I am sending proper values... but the other details are not stored in the Database. Instead of other values, there null values are stored in the Database. Please guide me. Ask any more details
Artifacts of null
List of Artifacts of null maven depenency
Drop Table
Drop Table       Drop Table in SQL get rid of an object or table from the database. Using a drop Query... from database. The Drop table cannot get it back, once you run the drop Query
Drop Index
Drop Index       Drop.... Understand with Example The Tutorial illustrate an example from Drop Index...: insert into Stu_Table values(1,'Komal',10,1,45); insert
drop down menu
drop down menu  drop down menu using html
Pls provide me jsp code to get values in drop down list from another table's field....
Pls provide me jsp code to get values in drop down list from another table's field....  my project has customer registration and company registration... in customer registration page and should be shown in drop down box in front end
dynamic drop down
dynamic drop down   I have created 2 drop downs in jsp.1... into the designation drop down (use jsp+javascript+servlet) reply soon   1...("Microsoft.XMLHTTP"); } if(xmlHttp==null){ alert("Browser does not support
null pointer exception in java
null pointer exception in java  What is null pointer exception in Java and when it occurs? Show it with an example.Thanks!   Java Null Pointer Exception
Null pointer execption
Null pointer execption  what is null pointer exception. I am getting the null pointer exception in this line conn= com.mypay.dao.Connection.getConnection(); what is wrong
Null pointer execption
Null pointer execption  what is null pointer exception. I am getting the null pointer exception in this line conn= com.mypay.dao.Connection.getConnection(); what is wrong
DROP a table and TRUNCATE
DROP a table and TRUNCATE   What are the differences between DROP a table and TRUNCATE a table
ajax+options is null or not an Object
ajax+options is null or not an Object  HI i have developed a simple ajax application contains two drop down lists and and one search button when i... is null or not an Obejct.. here im sending my code select.jsp <%@page
Mysql Alter Allow Null
Mysql Alter Allow Null       Mysql Alter Allow Null is used to change the Null Type of a column in a table.The Allow Null allows the null type characteristics in a column
SQL NOT NULL Constraint
SQL NOT NULL Constraint       The NOT NULL constraint allows a column not to accept NULL values..._Class" column not to accept NULL values. The insert into adds
Httpservletresponse null pointer exception.
Httpservletresponse null pointer exception.  What is Httpservletresponse null pointer exception?   NullPointerException occurs when we try to implement an application without referencing the object and allocating
Null Pointer Exception
Null Pointer Exception  whis is the Null Pointer Exception in java? or define Null Pointer Exception with exp?   NullPointerException occurs, when you try to implement an application without referencing the object
Output of null value
main(String [] args){ String str=null; System.out.println(str); } } Output value Null Description:- In the given example... a String variable and initialized it with null value
org.apache.jasper.JasperException: java.lang.NumberFormatException: null
: null" exception. Also "The server encountered an internal error... con=null; int mobile=Integer.parseInt(request.getParameter("mobile...=con.createStatement(); st.executeUpdate("insert into stud values("+mobile
Drop down menu
Drop down menu  I have drop down list of some 14 links which links to the table,If i click each link the table should display below the link and again if i click the link the table should not appear. please help me
Drop down menu
Drop down menu  I have created a drop down list of links which links to a table but if i click the link the table display in the other page i want to display it in the same page.Please tell me the solution

Ads