coordle/preprocessing/cord_19_data.py
def _clean_metadata(self, metadata_df: pd.DataFrame) -> pd.DataFrame:
        '''Cleans given metadata Pandas DataFrame by first
        removing duplicates, then dropping articles without metadata.
        
        Args:
            metadata_df: Metadata Pandas DataFrame to clean
        
        Returns:
            metadata_df: Cleaned metadata Pandas DataFrame
        '''
        print('Cleaning metadata...')
        
        # Remove duplicate cord_uid rows from the metadata.
        metadata_df.drop_duplicates(subset='cord_uid', inplace=True)

        # Drop articles without metadata
        metadata_df = metadata_df[metadata_df.full_text_file.notna()]
        
        print('Done!')
        return metadata_df
Cleans given metadata Pandas DataFrame by first
        removing duplicates, then dropping articles without metadata.
        
        Args:
            metadata_df: Metadata Pandas DataFrame to clean
        
        Returns:
            metadata_df: Cleaned metadata Pandas DataFrame
        
Cleans given metadata Pandas DataFrame by first
removing duplicates, then dropping articles without metadata.
Cleans given metadata Pandas DataFrame by first removing duplicates then dropping articles without metadata .
def _clean_metadata(self, metadata_df: pd.DataFrame) -> pd.DataFrame:
        print('Cleaning metadata...')
        metadata_df.drop_duplicates(subset='cord_uid', inplace=True)
        metadata_df = metadata_df[metadata_df.full_text_file.notna()]
        print('Done!')
        return metadata_df
def _clean_metadata ( self , metadata_df : pd . DataFrame ) -> pd . DataFrame : print ( 'Cleaning metadata...' ) metadata_df . drop_duplicates ( subset = 'cord_uid' , inplace = True ) metadata_df = metadata_df [ metadata_df . full_text_file . notna ( ) ] print ( 'Done!' ) return metadata_df
Cleans given metadata Pandas DataFrame by first
removing duplicates, then dropping articles without metadata.
Cleans given metadata Pandas DataFrame by first removing duplicates then dropping articles without metadata .
'''Cleans given metadata Pandas DataFrame by first
        removing duplicates, then dropping articles without metadata.
        
        Args:
            metadata_df: Metadata Pandas DataFrame to clean
        
        Returns:
            metadata_df: Cleaned metadata Pandas DataFrame
        ''' # Remove duplicate cord_uid rows from the metadata. # Drop articles without metadata
Cleaned metadata Pandas DataFrame
Cleaned metadata Pandas DataFrame
metadata_df
self
metadata_df
pd.DataFrame
Metadata Pandas DataFrame to clean
Metadata Pandas DataFrame to clean