<jupyter_start><jupyter_text>To Populate My Database Automatically<jupyter_code>counter = True
while counter:
    id = int(input("Enter your id: "))
    name = input("Enter your name: ")
    salary = float(input("Enter your salary: "))
    department = input("Enter your department: ")
    position = input("Enter your position: ")
    hiredate = input("Enter your hiredate: ")
    entities = (id,name,salary,department,position,hiredate)
    cursor.execute("INSERT INTO colleagues(id,name,salary,department,position,hireDate) VALUES(?,?,?,?,?,?)",entities)
    con.commit()
    print('Data has been inserted!!!')
    print('Do you want to continue?')
    value = int(input("Enter 1 to continue and 0 to quit"))
    if value == 1:
        pass
    elif value == 0:
        print('Thank you!!')
        counter = False
    else:
        break
cursor.execute("SELECT * FROM colleagues")
data = cursor.fetchall()

for d in data:
  print(d)
  
newlist = []
for d in data:
    newlist.append({'id':d[0], 'name':d[1], 'salary':d[2], 'department':d[3], 'position':d[4], 'hiredate':d[5]})
import pandas as pd


df = pd.DataFrame(newlist)
df.head()
df.dtypes
df.shape<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15824915824915825, 'fraction_numerical': 0.008417508417508417, 'mean_word_length': 4.038135593220339, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '241862', 'license': 'MIT', 'n_tokens_mistral': 402, 'n_tokens_neox': 395, 'n_words': 100, 'path': 'Database_Manipulation.ipynb', 'repo_name': 'K-O-N/Database_manipulation', 'size': '1188'}