<jupyter_start><jupyter_text>IMPORT DATA FROM ALL SOURCE (EXCL, CSV, SQL, CLOUD) IMPORT DATA FROM EXCL<jupyter_code>import pandas as pd
data = pd.read_excel('../data_source/Datsar_Daop6.xlsx', sheet_name='Kereta_SLO')
data.head()<jupyter_output><empty_output><jupyter_text>IMPORT DATA FROM CSV<jupyter_code>data2 = pd.read_csv('../data_source/forbes_top_rich.csv')
data2.head()<jupyter_output><empty_output><jupyter_text>IMPORT DATA FORM TXT FILE<jupyter_code>import pandas as pd
df = pd.read_csv('..\data_source\ihsg.txt')
df.head()<jupyter_output><empty_output><jupyter_text>IMPORT DATA FROM SQL<jupyter_code>import mysql.connector as sql

config = {
 'user': 'root',
 'password': '',
 'host': '127.0.0.1',
 'database': 'dqlab',
}


mydb = sql.connect(**config)
query = "Select * from ms_pelanggan;"
df2 = pd.read_sql(query,mydb)
    

df2.head()<jupyter_output><empty_output><jupyter_text>IMPORT DATA FROM CLOUD/HTTP<jupyter_code>retail_raw = pd.read_csv('https://dqlab-dataset.s3-ap-southeast-1.amazonaws.com/retail_raw_reduced_data_quality.csv')
retail_raw.head()<jupyter_output><empty_output><jupyter_text>IMPORT DATA FROM JASON FILE<jupyter_code>state = pd.read_json('https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/a890ca2c6846e5953183ecdb214b9d3f13cdc9ea/states.json')

state.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1448736998514116, 'fraction_numerical': 0.0274888558692422, 'mean_word_length': 7.8618421052631575, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '173706', 'license': 'MIT', 'n_tokens_mistral': 567, 'n_tokens_neox': 552, 'n_words': 69, 'path': 'Latihan/SintaxDasar/import_data_all.ipynb', 'repo_name': 'cktheone/DQLab', 'size': '1346'}