|
|
|
import numpy as np |
|
import pandas as pd |
|
import re |
|
from re import sub |
|
import smtplib |
|
import matplotlib.pyplot as plt |
|
from itertools import product |
|
from tqdm import tqdm_notebook, tqdm, trange |
|
import time |
|
import seaborn as sns |
|
from matplotlib.pyplot import style |
|
from rich import print |
|
import warnings |
|
warnings.filterwarnings('ignore') |
|
sns.set() |
|
|
|
|
|
import csv |
|
|
|
def save_database_info(filepath, database_name, date): |
|
|
|
with open(f'./database_name.csv', 'r', encoding='utf-8') as file: |
|
|
|
reader = csv.reader(file) |
|
|
|
|
|
rows = [] |
|
for row in reader: |
|
rows.append(row) |
|
|
|
|
|
|
|
new_row = [database_name, date] |
|
rows.append(new_row) |
|
|
|
|
|
with open('./database_name.csv', 'w', newline='', encoding='utf-8') as file: |
|
|
|
writer = csv.writer(file) |
|
|
|
writer.writerows(rows) |
|
|
|
|
|
file.close() |
|
|
|
return None |