This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import plotly libraiy and "%matplotlib inline" is to fix charts in proper manner in the jupyter lab | |
| import plotly.express as px | |
| %matplotlib inline | |
| # We fix all configurations concern our visuals | |
| sns.set_style('darkgrid') | |
| matplotlib.rcParams['font.size']=14 | |
| matplotlib.rcParams['figure.figsize']=(200,45) | |
| matplotlib.rcParams['figure.facecolor']='#00000000' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To get the statistical summary of the data | |
| medical_df.describe() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To get information about our dataset | |
| medical_df.info() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To display the top 5 rows | |
| medical_df.head(5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The link of our dataset | |
| medical_charges_url = 'https://raw.githubusercontent.com/JovianML/opendatasets/master/data/medical-charges.csv' | |
| # The urlretrieve function to put data in 'medical.csv' format | |
| urlretrieve(medical_charges_url, 'medical.csv') | |
| # Here, we're using pd.read_csv function to pull or read our data | |
| medical_df = pd.read_csv('medical.csv') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import numpy as np | |
| import matplotlib | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| from urllib.request import urlretrieve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT STUDENT_ID AS ID, | |
| STUDENT_NAME AS NAME, | |
| STUDENT_ADDRESS ADDRESS | |
| FROM STUDENT; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT st.name, | |
| st.percentage, | |
| IF(st.percentage >= 35, 'Pass', 'Fail') AS `Remark` | |
| FROM student AS st ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT st.name, | |
| st.percentage, | |
| CASE WHEN st.percentage >= 35 THEN 'Pass' ELSE 'Fail' END AS `Remark` | |
| FROM student AS st ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * FROM customers WHERE name LIKE '%son%'; |
NewerOlder