We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86c68bc commit b18fc6eCopy full SHA for b18fc6e
sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala
@@ -1252,11 +1252,11 @@ class DataFrame private[sql](
1252
*/
1253
@scala.annotation.varargs
1254
def drop(colNames: String*): DataFrame = {
1255
- val remainingCols = df.schema.filter(f => colNames.contains(f.name)).map(f => Column(f.name))
1256
- if (remainingCols.size == df.schema.size) {
+ val remainingCols = this.schema.filter(f => colNames.contains(f.name)).map(f => Column(f.name))
+ if (remainingCols.size == this.schema.size) {
1257
this
1258
} else {
1259
- df.select(remainingCols: _*)
+ this.select(remainingCols: _*)
1260
}
1261
1262
0 commit comments