data/process_data.py
def load_data(messages_filepath, categories_filepath):
    '''This function will load the messages and categories datasets.
    
    Then, this function will merge the datasets by left join using the common id and then return a pandas dataframe. 
    
    If the input is invalid or the data does not exist, this function will raise an error. 
    
    INPUT:
    messages_filepath --> location of messages data file from the project root
    categories_filepath --> location of the categories data file from the project root
    
    OUTPUT:
    df --> a DataFrame containing the merged dataset 
    '''
    
    #load the messages dataset
    messages = pd.read_csv(messages_filepath)
    
    #load the categories dataset
    categories = pd.read_csv(categories_filepath)
    
    #merge the two datasets
    df = pd.merge(messages, categories, on='id', how = 'left')
    
    return df
This function will load the messages and categories datasets.
    
    Then, this function will merge the datasets by left join using the common id and then return a pandas dataframe. 
    
    If the input is invalid or the data does not exist, this function will raise an error. 
    
    INPUT:
    messages_filepath --> location of messages data file from the project root
    categories_filepath --> location of the categories data file from the project root
    
    OUTPUT:
    df --> a DataFrame containing the merged dataset 
    
This function will load the messages and categories datasets.
Then, this function will merge the datasets by left join using the common id and then return a pandas dataframe.

If the input is invalid or the data does not exist, this function will raise an error.

-> location of messages data file from the project root
categories_filepath --> location of the categories data file from the project root

-> a DataFrame containing the merged dataset
This function will load the messages and categories datasets . Then this function will merge the datasets by left join using the common id and then return a pandas dataframe . If the input is invalid or the data does not exist this function will raise an error . - > location of messages data file from the project root categories_filepath -- > location of the categories data file from the project root - > a DataFrame containing the merged dataset
def load_data(messages_filepath, categories_filepath):
    messages = pd.read_csv(messages_filepath)
    categories = pd.read_csv(categories_filepath)
    df = pd.merge(messages, categories, on='id', how = 'left')
    return df
def load_data ( messages_filepath , categories_filepath ) : messages = pd . read_csv ( messages_filepath ) categories = pd . read_csv ( categories_filepath ) df = pd . merge ( messages , categories , on = 'id' , how = 'left' ) return df
This function will load the messages and categories datasets.
This function will load the messages and categories datasets .
'''This function will load the messages and categories datasets.
    
    Then, this function will merge the datasets by left join using the common id and then return a pandas dataframe. 
    
    If the input is invalid or the data does not exist, this function will raise an error. 
    
    INPUT:
    messages_filepath --> location of messages data file from the project root
    categories_filepath --> location of the categories data file from the project root
    
    OUTPUT:
    df --> a DataFrame containing the merged dataset 
    ''' #load the messages dataset #load the categories dataset #merge the two datasets
messages_filepath
categories_filepath