final class DataFrameNaFunctions extends Logging
Provides functions for handling missing values in a DataFrame.
- Since
-
0.2.0
- Alphabetic
- By Inheritance
- DataFrameNaFunctions
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=
(
arg0:
Any
)
:
Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##
()
:
Int
- Definition Classes
- AnyRef → Any
-
final
def
==
(
arg0:
Any
)
:
Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf
[
T0
]
:
T0
- Definition Classes
- Any
-
def
clone
()
:
AnyRef
- Attributes
- protected[ lang ]
- Definition Classes
- AnyRef
- Annotations
- @throws ( ... ) @native () @HotSpotIntrinsicCandidate ()
-
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 columnscols
.Returns a new DataFrame that excludes all rows containing fewer than
minNonNullsPerRow
non-null and non-NaN values in the specified columnscols
.-
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
- Since
-
0.2.0
- Exceptions thrown
-
SnowparkClientException
if cols contains any unrecognized column name
-
If
-
final
def
eq
(
arg0:
AnyRef
)
:
Boolean
- Definition Classes
- AnyRef
-
def
equals
(
arg0:
Any
)
:
Boolean
- Definition Classes
- AnyRef → Any
-
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
- Since
-
0.2.0
- Exceptions thrown
-
SnowparkClientException
if valueMap contains unrecognized columns
-
final
def
getClass
()
:
Class
[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native () @HotSpotIntrinsicCandidate ()
-
def
hashCode
()
:
Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native () @HotSpotIntrinsicCandidate ()
-
final
def
isInstanceOf
[
T0
]
:
Boolean
- Definition Classes
- Any
-
def
log
()
:
Logger
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logDebug
(
msg:
String
,
throwable:
Throwable
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logDebug
(
msg:
String
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logError
(
msg:
String
,
throwable:
Throwable
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logError
(
msg:
String
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logInfo
(
msg:
String
,
throwable:
Throwable
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logInfo
(
msg:
String
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logTrace
(
msg:
String
,
throwable:
Throwable
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logTrace
(
msg:
String
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logWarning
(
msg:
String
,
throwable:
Throwable
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
def
logWarning
(
msg:
String
)
:
Unit
- Attributes
- protected[ internal ]
- Definition Classes
- Logging
-
final
def
ne
(
arg0:
AnyRef
)
:
Boolean
- Definition Classes
- AnyRef
-
final
def
notify
()
:
Unit
- Definition Classes
- AnyRef
- Annotations
- @native () @HotSpotIntrinsicCandidate ()
-
final
def
notifyAll
()
:
Unit
- Definition Classes
- AnyRef
- Annotations
- @native () @HotSpotIntrinsicCandidate ()
-
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
forcolName
andMap(2 -> 3, None -> 2, 4 -> null)
forreplacement
. Incol1
, this function replaces:-
2
with3
- null with2
-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
-
final
def
synchronized
[
T0
]
(
arg0: ⇒
T0
)
:
T0
- Definition Classes
- AnyRef
-
def
toString
()
:
String
- Definition Classes
- AnyRef → Any
-
final
def
wait
(
arg0:
Long
,
arg1:
Int
)
:
Unit
- Definition Classes
- AnyRef
- Annotations
- @throws ( ... )
-
final
def
wait
(
arg0:
Long
)
:
Unit
- Definition Classes
- AnyRef
- Annotations
- @throws ( ... ) @native ()
-
final
def
wait
()
:
Unit
- Definition Classes
- AnyRef
- Annotations
- @throws ( ... )
Deprecated Value Members
-
def
finalize
()
:
Unit
- Attributes
- protected[ lang ]
- Definition Classes
- AnyRef
- Annotations
- @throws ( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated