Skip to content

Instantly share code, notes, and snippets.

View 5Spaak's full-sized avatar
😉

Spaak NGOMA 5Spaak

😉
View GitHub Profile
# 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'
# To get the statistical summary of the data
medical_df.describe()
# To get information about our dataset
medical_df.info()
# To display the top 5 rows
medical_df.head(5)
# 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')
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
from urllib.request import urlretrieve
SELECT STUDENT_ID AS ID,
STUDENT_NAME AS NAME,
STUDENT_ADDRESS ADDRESS
FROM STUDENT;
SELECT st.name,
st.percentage,
IF(st.percentage >= 35, 'Pass', 'Fail') AS `Remark`
FROM student AS st ;
SELECT st.name,
st.percentage,
CASE WHEN st.percentage >= 35 THEN 'Pass' ELSE 'Fail' END AS `Remark`
FROM student AS st ;
SELECT * FROM customers WHERE name LIKE '%son%';