<jupyter_start><jupyter_text>mh_df<jupyter_code>mh_df.isnull().sum()
mh_df['Job_title']
mh_df.keys()
salaries_df.keys()
complete_mh_df = mh_df.merge(salaries_df, on='Job_title', how='left', suffixes=('_mh', '_salaries')
)
complete_mh_df.head()
db_string = f"postgres://postgres:{db_password}@127.0.0.1:5432/movie_data"
pip install psycopg2-binary
engine = create_engine(db_string)
complete_mh_df.to_sql(name='mh', con=engine)
rows_imported = 0
# get the start_time from time.time()
start_time = time.time()
for data in pd.read_csv(f'{file_dir}ratings.csv', chunksize=1000000):
    print(f'importing rows {rows_imported} to {rows_imported + len(data)}...', end='')
    data.to_sql(name='ratings', con=engine, if_exists='append')
    rows_imported += len(data)

    # add elapsed time to final print out
    print(f'Done. {time.time() - start_time} total seconds elapsed')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15888888888888889, 'fraction_numerical': 0.021111111111111112, 'mean_word_length': 6.767241379310345, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '273393', 'license': 'MIT', 'n_tokens_mistral': 372, 'n_tokens_neox': 347, 'n_words': 59, 'path': 'database/OSMI_MH_create_database.ipynb', 'repo_name': 'ArtTucker/mental_health_and_economics', 'size': '900'}