When using fillna or na.fill in teradatamlspk, all input arguments must be of the same data type or their types must be compatible.
For example, if value is a integer type, and subset contains a string column, PySpark ignores the replacement but, teradatamlspk raises an error. You must drop incompatible columns or cast them to the compatible ones.
PySpark
>>> df.fillna(12).show()
+----------+-----+---+---+---+ | accounts| Feb|Jan|Mar|Apr| +----------+-----+---+---+---+ | Red Inc|200.0|150|140| 12| | NULL| 12.0| 12| 12|250| | Blue Inc| 90.0| 50| 95|101| | NULL| 12.0|200|215|250| |Yellow Inc| 90.0| 12| 12| 12| | Jones LLC|200.0|150|140|180| +----------+-----+---+---+---+
teradatamlspk
>>> df.drop("accounts").fillna(12).show()
+-----+-----+-----+-----+ | Feb| Jan| Mar| Apr| +-----+-----+-----+-----+ | 90.0| 50.0| 95.0|101.0| | 90.0| 12.0| 12.0| 12.0| |200.0|150.0|140.0|180.0| | 12.0|200.0|215.0|250.0| | 12.0| 12.0| 12.0|250.0| |200.0|150.0|140.0| 12.0| +-----+-----+-----+-----+