class_docstr: A collection of data which can be pre-processed in parallel on Spark.
class_docstr_tok: ["A","collection","of","data","which","can","be","pre-processed","in","parallel","on","Spark","."]
docstr:  With SparkXShards of pandas data frame, the api will get null numbers for
   each column. For other type of SparkXShards, it will throw exception
  
  :return: pandas data frame with 2 columns, `col` represents column name,
   `total` represents null numbers
   
docstr_tok: ["With","SparkXShards","of","pandas","data","frame",",","the","api","will","get","null","numbers","for","each","column",".","For","other","type","of","SparkXShards",",","it","will","throw","exception",":","return",":","pandas","data","frame","with","2","columns",",","`","col","`","represents","column","name",",","`","total","`","represents","null","numbers"]
code: def get_null_sum(self) -> "PandasDataFrame":
      """
       With SparkXShards of pandas data frame, the api will get null numbers for
       each column. For other type of SparkXShards, it will throw exception
  
      :return: pandas data frame with 2 columns, `col` represents column name,
       `total` represents null numbers
      """
      if self._get_class_name() != "pandas.core.frame.DataFrame":
          invalidInputError(
              False,
              "Currently only support get_null_sum() on"
              " XShards of Pandas DataFrame",
          )
  
      def get_na_sum(iter):
          for df in iter:
              import pandas as pd
  
              series = df.isnull().sum()
              df = pd.DataFrame(
                  {"col": series.index, "total": series.values}
              )
              return [df]
  
      na_cnt_rdd = self.rdd.mapPartitions(get_na_sum)
  
      na_cnt = na_cnt_rdd.reduce(lambda l1, l2: l1.add(l2))
      return na_cnt
  
imports: from py4j.protocol import Py4JError
  from bigdl.orca.data.utils import *
  from bigdl.orca import OrcaContext
  from bigdl.dllib.utils.common import get_node_and_core_number, get_spark_sql_context, get_spark_context
  from bigdl.dllib.utils import nest
  from bigdl.dllib.utils.log4Error import invalidInputError
  import numpy
  from typing import TYPE_CHECKING, Any
  from typing import Callable, Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 21 for calling the SparkXShards obj's underlying member method code with example usage: obj.get_null_sum() and returns: na_cnt, list