<jupyter_start><jupyter_text><img src="../../media/decartes.jpg"alt="DeCART Icon" width="128" height="171">DeCART Summer SchoolforBiomedical Data Science<imgsrc="../../media/U_Health_stacked_png_red.png" alt="Utah HealthLogo" width="128" height="134"> MIMIC2 Heart Rate DataThe heart rate and blood pressure data we have been working with is on the verge of worthlessness. Why? What do we know about the data originally? The numeric data we are analyzing were all pulled from a MySQL databaseIn this notebook we will do a SQL query to see what the originally data looked like.<jupyter_code>import pymysql ## all the data in mysql database, convert to python package
import pandas as pd
import getpass
conn = pymysql.connect(host="mysql",port=3306,
                       user="jovyan",passwd=<PASSWORD>("Enter password for MIMIC2 database"),
                       db='mimic2')
cursor = conn.cursor() ## holder for the data from the connection, one by one
bloodpressure = pd.read_sql("""SELECT * FROM chartevents WHERE 
                            itemid in (6, 51, 455, 6701) LIMIT 1000""",conn)

bloodpressure.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09843205574912892, 'fraction_numerical': 0.028745644599303136, 'mean_word_length': 4.061674008810573, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '23087', 'license': 'MIT', 'n_tokens_mistral': 356, 'n_tokens_neox': 321, 'n_words': 123, 'path': 'original_bp_data.ipynb', 'repo_name': 'dychangfeng/my_decart_camp', 'size': '1153'}