lale/datasets/multitable/fetch_datasets.py
def fetch_imdb_dataset(datatype="pandas"):

    """
    Fetches the IMDB movie dataset from Relational Dataset Repo.
    It contains information about directors, actors, roles
    and genres of multiple movies in form of 7 CSV files.
    This method downloads and stores these 7 CSV files under the
    'lale/lale/datasets/multitable/imdb_data' directory. It creates
    this directory by itself if it does not exists.

    Dataset URL: https://relational.fit.cvut.cz/dataset/IMDb

    Parameters
    ----------
    datatype : string, optional, default 'pandas'

      If 'pandas',
      Returns a list of singleton dictionaries (each element of the list is one
      table from the dataset) after reading the already existing CSV files.
      The key of each dictionary is the name of the table and the value contains
      a pandas dataframe consisting of the data.

      If 'spark',
      Returns a list of singleton dictionaries (each element of the list is one
      table from the dataset) after reading the already existing CSV files.
      The key of each dictionary is the name of the table and the value contains
      a spark dataframe consisting of the data.

      Else,
      Throws an error as it does not support any other return type.

    Returns
    -------
    imdb_list : list of singleton dictionary of pandas / spark dataframes
    """

    download_data_dir = os.path.join(os.path.dirname(__file__), "imdb_data")
    imdb_list = []
    if not os.path.exists(download_data_dir):
        raise ValueError(
            "IMDB dataset not found at {}. Please download it using lalegpl repository.".format(
                download_data_dir
            )
        )
    else:
        for root, dirs, files in os.walk(download_data_dir):
            for file in files:
                filename, extension = os.path.splitext(file)
                if extension == ".csv":
                    data_file_name = os.path.join(download_data_dir, file)
                    table_name = filename
                    data_frame = get_data_from_csv(datatype, data_file_name)
                    imdb_list.append(add_table_name(data_frame, table_name))
        if len(imdb_list) == 7:
            logger.info(" Fetched the IMDB dataset. Process completed.")
        else:
            raise ValueError(
                "Incomplete IMDB dataset found at {}. Please download complete dataset using lalegpl repository.".format(
                    download_data_dir
                )
            )
    return imdb_list

    Fetches the IMDB movie dataset from Relational Dataset Repo.
    It contains information about directors, actors, roles
    and genres of multiple movies in form of 7 CSV files.
    This method downloads and stores these 7 CSV files under the
    'lale/lale/datasets/multitable/imdb_data' directory. It creates
    this directory by itself if it does not exists.

    Dataset URL: https://relational.fit.cvut.cz/dataset/IMDb

    Parameters
    ----------
    datatype : string, optional, default 'pandas'

      If 'pandas',
      Returns a list of singleton dictionaries (each element of the list is one
      table from the dataset) after reading the already existing CSV files.
      The key of each dictionary is the name of the table and the value contains
      a pandas dataframe consisting of the data.

      If 'spark',
      Returns a list of singleton dictionaries (each element of the list is one
      table from the dataset) after reading the already existing CSV files.
      The key of each dictionary is the name of the table and the value contains
      a spark dataframe consisting of the data.

      Else,
      Throws an error as it does not support any other return type.

    Returns
    -------
    imdb_list : list of singleton dictionary of pandas / spark dataframes
    
Fetches the IMDB movie dataset from Relational Dataset Repo.
It contains information about directors, actors, roles
and genres of multiple movies in form of 7 CSV files.
This method downloads and stores these 7 CSV files under the
'lale/lale/datasets/multitable/imdb_data' directory. It creates
this directory by itself if it does not exists.



Parameters

datatype : string, optional, default 'pandas'

If 'pandas',
Returns a list of singleton dictionaries (each element of the list is one
table from the dataset) after reading the already existing CSV files.
The key of each dictionary is the name of the table and the value contains
a pandas dataframe consisting of the data.

If 'spark',
Returns a list of singleton dictionaries (each element of the list is one
table from the dataset) after reading the already existing CSV files.
The key of each dictionary is the name of the table and the value contains
a spark dataframe consisting of the data.

Else,
Throws an error as it does not support any other return type.

Returns

imdb_list : list of singleton dictionary of pandas / spark dataframes
Fetches the IMDB movie dataset from Relational Dataset Repo . It contains information about directors actors roles and genres of multiple movies in form of 7 CSV files . This method downloads and stores these 7 CSV files under the ' lale / lale / datasets / multitable / imdb_data ' directory . It creates this directory by itself if it does not exists . Parameters datatype : string optional default ' pandas ' If ' pandas ' Returns a list of singleton dictionaries ( each element of the list is one table from the dataset ) after reading the already existing CSV files . The key of each dictionary is the name of the table and the value contains a pandas dataframe consisting of the data . If ' spark ' Returns a list of singleton dictionaries ( each element of the list is one table from the dataset ) after reading the already existing CSV files . The key of each dictionary is the name of the table and the value contains a spark dataframe consisting of the data . Else Throws an error as it does not support any other return type . Returns imdb_list : list of singleton dictionary of pandas / spark dataframes
def fetch_imdb_dataset(datatype="pandas"):
    download_data_dir = os.path.join(os.path.dirname(__file__), "imdb_data")
    imdb_list = []
    if not os.path.exists(download_data_dir):
        raise ValueError(
            "IMDB dataset not found at {}. Please download it using lalegpl repository.".format(
                download_data_dir
            )
        )
    else:
        for root, dirs, files in os.walk(download_data_dir):
            for file in files:
                filename, extension = os.path.splitext(file)
                if extension == ".csv":
                    data_file_name = os.path.join(download_data_dir, file)
                    table_name = filename
                    data_frame = get_data_from_csv(datatype, data_file_name)
                    imdb_list.append(add_table_name(data_frame, table_name))
        if len(imdb_list) == 7:
            logger.info(" Fetched the IMDB dataset. Process completed.")
        else:
            raise ValueError(
                "Incomplete IMDB dataset found at {}. Please download complete dataset using lalegpl repository.".format(
                    download_data_dir
                )
            )
    return imdb_list
def fetch_imdb_dataset ( datatype = "pandas" ) : download_data_dir = os . path . join ( os . path . dirname ( __file__ ) , "imdb_data" ) imdb_list = [ ] if not os . path . exists ( download_data_dir ) : raise ValueError ( "IMDB dataset not found at {}. Please download it using lalegpl repository." . format ( download_data_dir ) ) else : for root , dirs , files in os . walk ( download_data_dir ) : for file in files : filename , extension = os . path . splitext ( file ) if extension == ".csv" : data_file_name = os . path . join ( download_data_dir , file ) table_name = filename data_frame = get_data_from_csv ( datatype , data_file_name ) imdb_list . append ( add_table_name ( data_frame , table_name ) ) if len ( imdb_list ) == 7 : logger . info ( " Fetched the IMDB dataset. Process completed." ) else : raise ValueError ( "Incomplete IMDB dataset found at {}. Please download complete dataset using lalegpl repository." . format ( download_data_dir ) ) return imdb_list
Fetches the IMDB movie dataset from Relational Dataset Repo.
Fetches the IMDB movie dataset from Relational Dataset Repo .
"""
    Fetches the IMDB movie dataset from Relational Dataset Repo.
    It contains information about directors, actors, roles
    and genres of multiple movies in form of 7 CSV files.
    This method downloads and stores these 7 CSV files under the
    'lale/lale/datasets/multitable/imdb_data' directory. It creates
    this directory by itself if it does not exists.

    Dataset URL: https://relational.fit.cvut.cz/dataset/IMDb

    Parameters
    ----------
    datatype : string, optional, default 'pandas'

      If 'pandas',
      Returns a list of singleton dictionaries (each element of the list is one
      table from the dataset) after reading the already existing CSV files.
      The key of each dictionary is the name of the table and the value contains
      a pandas dataframe consisting of the data.

      If 'spark',
      Returns a list of singleton dictionaries (each element of the list is one
      table from the dataset) after reading the already existing CSV files.
      The key of each dictionary is the name of the table and the value contains
      a spark dataframe consisting of the data.

      Else,
      Throws an error as it does not support any other return type.

    Returns
    -------
    imdb_list : list of singleton dictionary of pandas / spark dataframes
    """
datatype