注: 以下の翻訳の正確性は検証されていません。AIPを利用して英語版の原文から機械的に翻訳されたものです。
DataFrame.distinct()元の DataFrame の重複のない行を含む新しい DataFrame を返します。
Copied!1df = df.distinct()
DataFrame.drop_duplicates(subset=None)重複行を削除した新しい DataFrame を返します。任意で、特定の列のみを考慮できます。
Copied!1 2df = df.drop_duplicates() df = df.drop_duplicates(["firstname", "lastname"])
DataFrame.dropna(how='any', thresh=None, subset=None)エイリアス: DataFrame.na.dropna(how='any', thresh=None, subset=None)
null 値を含む行を除外した新しい DataFrame を返します。DataFrame.dropna() と DataFrameNaFunctions.drop() は互いのエイリアスです。
パラメーター:
'any' または 'all'。
'any' の場合、null 値を1つでも含む行を削除します。'all' の場合、すべての値が null の行のみを削除します。None です。指定した場合、null 以外の値の数が thresh より小さい行を削除します。(how パラメーターを上書きします)。DataFrame.limit(number)DataFrame.sort(*cols, **kwargs)エイリアス: DataFrame.orderBy(*cols, **kwargs)
Column.asc() または F.asc(col)Column.desc() または F.desc(col)