Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

spark dataframe without column

Since Spark 1.4 you can use drop method:

#Scala
case class Point(x: Int, y: Int)
val df = sqlContext.createDataFrame(Point(0, 0) :: Point(1, 2) :: Nil)
df.drop("y")

#Python
df = sc.parallelize([(0, 0), (1, 2)]).toDF(["x", "y"])
df.drop("y")
## DataFrame[x: bigint]
Comment

PREVIOUS NEXT
Code Example
Python :: gdal user with anaconda 
Python :: django filter word count greater than 
Python :: elongated muskrat 
Python :: how to write string in python 
Python :: Rewrite the equation shown in Figure 2.4 as a Python expression and get the result of the equation: Pay special attention to the order of operations. 
Python :: compile and train cnn models 
Python :: import all models 
Python :: Faster way to find list of unique elements in a list 
Python :: sns linear regression 
Python :: iterating over the two ranges simultaneously and saving it in database 
Python :: fibonacci series python program 
Python :: copy any files from one folder to another folder in python 
Python :: indentation error in python atom editor 
Python :: remove last comma forloop django 
Python :: convert unit dynamo revit 
Python :: pandas normalize rows to max value 
Python :: cross-validation sklearn image classification 
Python :: python get last cell value 
Python :: convert ui to py 
Python :: Notice there is a bug when using astimezone() on utc time. This gives an incorrect result: 
Python :: accumulate sum of elements in list 
Python :: django email PasswordResetView template path 
Python :: python abbreviated for loop 
Python :: make seaborn plot larger to fit legend 
Python :: Data type based on rows 
Python :: logging errors into emails 
Python :: Simple Example to Plot Python Treemap with lables 
Python :: load model pytorchand freeze 
Python :: linkedin python test 
Python :: convert a float array to an integer 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =