Snowpark Scala API Reference1.21.0 < Back


# Packages

-  package root
  Definition Classes
    root
-  package com
  Definition Classes
    root
-  package snowflake
  Definition Classes
    com
-  package snowpark
  Definition Classes
    snowflake
-  package types

  This package contains all Snowpark logical types.

  This package contains all Snowpark logical types.

  Definition Classes
    snowpark
  Since

    0.1.0

-  package udaf
  Definition Classes
    snowpark
-  package udtf
  Definition Classes
    snowpark
- AggregateFunction
- AsyncJob
- CaseExpr
- Column
- CopyableDataFrame
- CopyableDataFrameAsyncActor
- DataFrame
- DataFrameAsyncActor
- DataFrameNaFunctions
- DataFrameReader
- DataFrameStatFunctions
- DataFrameWriter
- DataFrameWriterAsyncActor
- DeleteResult
- FileOperation
- GetResult
- GroupingSets
- HasCachedResult
- MatchedClauseBuilder
- MergeBuilder
- MergeBuilderAsyncActor
- MergeResult
- MergeTypedAsyncJob
- NotMatchedClauseBuilder
- PublicPreview
- PutResult
- RelationalGroupedDataFrame
- Row
- SProcRegistration
- SaveMode
- Session
- SnowparkClientException
- StoredProcedure
- TableFunction
- TypedAsyncJob
- UDAFRegistration
- UDFRegistration
- UDTFRegistration
- Updatable
- UpdatableAsyncActor
- UpdateResult
- UserDefinedFunction
- Window
- WindowSpec
- WriteFileResult
- functions
- tableFunctions

c

com.snowflake.snowpark

# DataFrameNaFunctions

###

#### final class DataFrameNaFunctions extends Logging

Provides functions for handling missing values in a DataFrame.

Since

  0.2.0

Linear Supertypes
Logging, AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. DataFrameNaFunctions
2. Logging
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
6.  def drop(minNonNullsPerRow: Int, cols: Seq[String]): DataFrame

   Returns a new DataFrame that excludes all rows containing fewer than `minNonNullsPerRow` non-null and non-NaN values in the specified columns `cols` .

   Returns a new DataFrame that excludes all rows containing fewer than `minNonNullsPerRow` non-null and non-NaN values in the specified columns `cols` .

   - If `minNonNullsPerRow` is greater than the number of the specified columns, the method returns an empty DataFrame.
   - If `minNonNullsPerRow` is less than 1, the method returns the original DataFrame.
   - If `cols` is empty, the method returns the original DataFrame.
   minNonNullsPerRow

     The minimum number of non-null and non-NaN values that should be in the specified columns in order for the row to be included.

   cols

     A sequence of the names of columns to check for null and NaN values.

   returns

     A DataFrame

   Since

     0.2.0

   Exceptions thrown

     `SnowparkClientException` if cols contains any unrecognized column name

7.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
8.  def equals(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef → Any
9.  def fill(valueMap: Map[String, Any]): DataFrame

   Returns a new DataFrame that replaces all null and NaN values in the specified columns with the values provided.

   Returns a new DataFrame that replaces all null and NaN values in the specified columns with the values provided.

   `valueMap` describes which columns will be replaced and what the replacement values are.

   - It only supports Long, Int, short, byte, String, Boolean, float, and Double values.
   - If the type of the given value doesn't match the column type (e.g. a Long value for a StringType column), the replacement in this column will be skipped.
   valueMap

     A Map that associates the names of columns with the values that should be used to replace null and NaN values in those columns.

   returns

     A DataFrame

   Since

     0.2.0

   Exceptions thrown

     `SnowparkClientException` if valueMap contains unrecognized columns

10.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @HotSpotIntrinsicCandidate() @native()
11.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @HotSpotIntrinsicCandidate() @native()
12.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
13.  def log(): Logger
    Attributes
      protected[internal]
    Definition Classes
      Logging
14.  def logDebug(msg: String, throwable: Throwable): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
15.  def logDebug(msg: String): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
16.  def logError(msg: String, throwable: Throwable): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
17.  def logError(msg: String): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
18.  def logInfo(msg: String, throwable: Throwable): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
19.  def logInfo(msg: String): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
20.  def logTrace(msg: String, throwable: Throwable): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
21.  def logTrace(msg: String): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
22.  def logWarning(msg: String, throwable: Throwable): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
23.  def logWarning(msg: String): Unit
    Attributes
      protected[internal]
    Definition Classes
      Logging
24.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
25.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @HotSpotIntrinsicCandidate() @native()
26.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @HotSpotIntrinsicCandidate() @native()
27.  def replace(colName: String, replacement: Map[Any, Any]): DataFrame

    Returns a new DataFrame that replaces values in a specified column.

    Returns a new DataFrame that replaces values in a specified column.

    Use the `replacement` parameter to specify a Map that associates the values to replace with new values. To replace a null value, use None as the key in the Map.

    For example, suppose that you pass `col1` for `colName` and `Map(2 -> 3, None -> 2, 4 -> null)` for `replacement` . In `col1`, this function replaces:

    - `2` with `3`
    - null with `2`
    - `4` with null
    colName

      The name of the column in which the values should be replaced.

    replacement

      A Map that associates the original values with the replacement values.

    Since

      0.2.0

    Exceptions thrown

      `SnowparkClientException` if colName is an unrecognized column name

28.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
29.  def toString(): String
    Definition Classes
      AnyRef → Any
30.  def transformation(funcName: String)(func: => DataFrame): DataFrame
    Attributes
      protected
    Annotations
      @inline()
31.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
32.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
33.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])

### Deprecated Value Members

1.  def finalize(): Unit
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.Throwable]) @Deprecated
   Deprecated

     (Since version 9)

### Inherited from Logging

### Inherited from AnyRef

### Inherited from Any

### Ungrouped