class_docstr: DatasetBuilder for covid19 dataset.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(
      self, dl_manager: tfds.download.DownloadManager, archive_path
  ):
      """Yields examples."""
      pd = tfds.core.lazy_imports.pandas
      beam = tfds.core.lazy_imports.apache_beam
  
      def cast_according_to_column(feature_type, v):
          if feature_type == tf.string and isinstance(v, (float, int)):
              return str(v)
          return v
  
      file_handles = dl_manager.iter_archive(archive_path)
      _, file = next(file_handles)
  
      columns = pd.read_csv(file, nrows=1).columns
  
      def load_shard(index: int):
          # There is only one file so by using the for we guarantee that the file
          # will be closed.
          for _, file in dl_manager.iter_archive(archive_path):
              df = pd.read_csv(file, skiprows=index, nrows=_BATCH_SIZE)
              features = self.info.features
              result = []
              for i, row in df.iterrows():
                  example = {
                      k: cast_according_to_column(features[k].dtype, v)
                      for k, v in zip(columns, row.values)
                  }
                  result.append((index + i, example))
              return result
  
      return beam.Create(
          list(range(0, _N_RECORDS, _BATCH_SIZE))
      ) | beam.FlatMap(load_shard)
  
file_path: datasets/tensorflow_datasets/structured/covid19/covid19.py
imports: import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Covid19 obj's underlying member method code with example usage: obj._generate_examples(dl_manager, archive_path) and returns: unknown, v, str, result