30- Exploratory Data Analysis (EDA) with Python (Day-14)

  Рет қаралды 16,873

Codanics

Codanics

Күн бұрын

Пікірлер: 226
@Codanics
@Codanics 2 жыл бұрын
Please like and share the video, comment below if you have any question?
@talhanisarmughal
@talhanisarmughal 2 жыл бұрын
12:42 Brute Force technique to find the unique values of all columns def func(att): return titanic[att].unique() for i in titanic.columns: print(i,func(i))
@muhammadawon8164
@muhammadawon8164 2 жыл бұрын
Your every video is Gold!! Thank you
@FireyLeo007
@FireyLeo007 2 жыл бұрын
57:15 # for quick comparison between fare and fare_log ks_clean.boxplot('fare') ks_clean.boxplot('fare_log')
@faizasandhu_
@faizasandhu_ 2 жыл бұрын
I was waiting for your video💥 And was already watching yesterday's zoom session evern after attending meeting, ky kahin kuch miss na ho gya ho😀 PS: I also have a class at 9am But don't wanna miss these classes Baba Aamar_ GREAT👍
@engrismatullahkhan3828
@engrismatullahkhan3828 2 жыл бұрын
What an awesome work you are doing Sir .. Absolutely brilliant . Stay blessed .
@daniabatool7931
@daniabatool7931 2 жыл бұрын
12:42 to find unique values from multiple columns (np.unique(kashti[['sex', 'who']].values))
@syedabdulwahabshah3280
@syedabdulwahabshah3280 2 жыл бұрын
for int and float value it's not working , put (age,survived)and than check TypeError: '
@muhammadammarmohsin107
@muhammadammarmohsin107 2 жыл бұрын
50:35 Correlation is a statistical term describing the degree to which two variables move in coordination with one another. If the two variables move in the same direction, then those variables are said to have a positive correlation. If they move in opposite directions, then they have a negative correlation.
@taqi_haider
@taqi_haider 2 жыл бұрын
12:40 Assignment : to find the uniques values in multiple columns pd.concat([ks['survived'],ks['deck'],ks['Age'],ks['fare'],ks['class'],ks['survived']]).unique()
@Fayez-tk7ph
@Fayez-tk7ph 2 жыл бұрын
Timestamp: 57:12 Assignment # 02: The log transformation has made the graph clearer and easier to understand. In other words, we can say the data is less skewed.
@ikrambashir8604
@ikrambashir8604 2 жыл бұрын
12:00. Finding the code for unique values in multiple columns (boat['sex'].append(boat['alive'])).unique() output: array(['male', 'female', 'no', 'yes'], dtype=object)
@NasirJumani
@NasirJumani 2 жыл бұрын
@0:05 What a start baba G. New looks!
@Codanics
@Codanics 2 жыл бұрын
Ap bor na ho jao is liay
@NasirJumani
@NasirJumani 2 жыл бұрын
@@Codanics :D
@FireyLeo007
@FireyLeo007 2 жыл бұрын
11:25 # To pull out unique values from the kashti dataset "ks", the best way to approach is by "for-loop" function kdata = ks.columns # defining a new string to pull out the index names for kda in kdata: # starting for -loop print(ks[kda].unique()) # print out the values for individual unique column print()
@attaullah4998
@attaullah4998 2 жыл бұрын
Hazrat Behtareen ho gya hai. Learning and Enjoying
@syedkamranhaider9467
@syedkamranhaider9467 2 жыл бұрын
12:23 To get unique values for all the columns in pandas dataframe following line of code is used: print(ks.apply(lambda col: col.unique())) Explanation lambda is used to create single line function without name ''col'' is iterator which goes through every column in "ks" dataframe to find the unique values.
@asfandyarsaeed6402
@asfandyarsaeed6402 2 жыл бұрын
11:24 Assgingment solution: Q: find out the unique of all columns soultion_Theory : Use pandas.DataFrame.values on the ks to convert the DataFrame to a numpy.array. Call numpy.array.ravel() to flatten the numpy.array. Use pandas.unique(column_values) to get the unique values of the previous result column_values. Soultion_Code: col1=ks[:].values.ravel() col2=pd.unique(col1) print(col2) ## here we got with Baba G result set
@asfandyarsaeed6402
@asfandyarsaeed6402 2 жыл бұрын
Incase you want to see 3 column the do this col1=ks[['sex','who','class']].values.ravel() col2=pd.unique(col1) print(col2) output:: ['male' 'man' 'Third' 'female' 'woman' 'First' 'child' 'Second']
@khawarabbas815
@khawarabbas815 6 ай бұрын
Ma sha Allah very good way and easy way of teaching
@goharrahman5611
@goharrahman5611 2 жыл бұрын
11:25 Assignment 1 col1=ks[:].values.ravel() col2=pd.unique(col1) print(col2) 43:27 the plot of mean can be plot by the following code ks_clean.groupby(['sex', 'class']).mean().plot.bar()
@Zeeshan18382
@Zeeshan18382 Жыл бұрын
EDA ko itna asan kar diya apny kaya bat hai Dr sahab very nice
@muhammadsair8594
@muhammadsair8594 2 жыл бұрын
43:10 Group by plot code # Group by function to see data in groups and deploy plot ks_clean.groupby(['sex','class']).mean().plot.bar()
@mugheezAhmed
@mugheezAhmed 2 жыл бұрын
12:30 Assignment Here we use function of 'for' Unique = Ks columns For k in unique: Print(Ks[k].unique()) Print() :) Output: All unique values of column through one line of code
@AbdulHannan-dg6dl
@AbdulHannan-dg6dl 2 жыл бұрын
11:23 np.unique(boat[['sex', 'who','class']].values)) # Selective data more than one column for col in boat: print(boat[col].unique()) # Getting all data 30:56 new_boat[new_boat['age']
@syedabdulwahabshah3280
@syedabdulwahabshah3280 2 жыл бұрын
for int and float value it's not working , put (age,survived)and than check TypeError: '
@aajizattari
@aajizattari 2 жыл бұрын
11:40 np.unique (ks[['pclass', 'parch','alone']].values) Output: 0, True, 2, 3, 4, 5, 6]
@salmanirshad8356
@salmanirshad8356 2 жыл бұрын
11:27 #assignment ks[['survived', 'pclass', 'sex', 'age', 'sibsp', 'parch', 'fare', 'embarked', 'class', 'who', 'adult_male', 'deck', 'embark_town', 'alive', 'alone']].nunique()
@MujeebJan
@MujeebJan 2 жыл бұрын
12:44 pd.concat([ks['survived'],ks['who'],ks['deck'],ks['sex'],ks['class'],ks['adult_male'],ks['pclass'],ks['parch']]).unique() output: array([0, 1, 'man', 'woman', 'child', nan, 'C', 'E', 'G', 'D', 'A', 'B', 'F', 'male', 'female', 'Third', 'First', 'Second', 3, 2, 5, 4, 6], dtype=object)
@natureisrelaxing1053
@natureisrelaxing1053 2 жыл бұрын
12:09 To find the unique values of more than one columns pd.concat([ks['sex'],ks['who'],ks['survived']]).unique()
@atiyashaheen6624
@atiyashaheen6624 2 жыл бұрын
57:20 log se large number ko small numbers mein kr skte hain jis se uski graphical representation convenient ho jati hy
@zeeshanrafeeque9135
@zeeshanrafeeque9135 2 жыл бұрын
unique values of 2 or more columns in single line of code: pd.concat([ks['sex'],ks['pclass'],ks['who']]).unique()
@muhammadzeeshanafzal1996
@muhammadzeeshanafzal1996 2 жыл бұрын
Thank you bro your answer helped me to solve this query.. JazakAllah
@AyeshaFatima-zf5yn
@AyeshaFatima-zf5yn 2 жыл бұрын
Best video till now
@arslanakbar7783
@arslanakbar7783 2 жыл бұрын
12:20 Assignment # Get unique elements in multiple columns i.e. Sex & Class & Who (pd.concat((ks_clean['sex'],(ks_clean['class']),(ks_clean['who'])))).unique()
@doptopgaming9569
@doptopgaming9569 Жыл бұрын
excellent job sir respect
@mumairali766
@mumairali766 2 жыл бұрын
11:33 we can check the unique values in the two or more columns by using the [ [ ] ] f
@AounHussain
@AounHussain 2 жыл бұрын
12:41 Assignment #To find unique values from two columns ks['who'].append(ks['adult_male']).unique() Output: array(['man', 'woman', 'child', True, False], dtype=object)
@AounHussain
@AounHussain 2 жыл бұрын
33:58 It should be written as ks_clean=ks_clean.loc[ks_clean['age']
@AounHussain
@AounHussain 2 жыл бұрын
57:14 The Boxplot with 'fare_log' has very few outliers whereas that with 'fare' has many outliers
@ymentertainment2349
@ymentertainment2349 2 жыл бұрын
#12:55 Time pause Assignment bt in my case and bt mean boat and boat mean kashti bt[["survived", "pclass", 'sex', 'age', 'sibsp', 'parch', 'fare', 'embarked', 'class', 'who', 'adult_male', 'deck', 'embark_town', 'alive', 'alone']].nunique()
@data-science-tutors
@data-science-tutors 2 жыл бұрын
11:23 here we use for loop kd = ks.columns for k in kd: print(ks[k].unique()) print()
@FireyLeo007
@FireyLeo007 2 жыл бұрын
24.30 WORD OF CAUTION The data's stats (describe) has changed due to removal of the missing data. One needs to be very cautious as it has impact on your findings i.e. refined vs actual For example by removing the approx 177 rows of age, the survived rate went up which is not a true representation So one needs to be very vigilant and cautious as what you are removing from the dataset and its impact on your final report/findings.
@Codanics
@Codanics 2 жыл бұрын
Exactly
@ahsanzafar4921
@ahsanzafar4921 2 жыл бұрын
while removing outliers for age column, when data filtered with age < 66, it completely removes the outliers. So, i think the technique is to change values until you get no outlier to the value at which it gives outlier, now choose a value just below it, all ouliers will be removed.
@AllInOnekh
@AllInOnekh 2 жыл бұрын
@11:23 k=ks.columns for i in k: e=ks[i].nunique() print(e)
@faryalineurope
@faryalineurope 2 жыл бұрын
In 2nd step of cleaning data, where you are trying to plot a bar graph using groupby function. If we put () after "bar" then the code can work. ks_clean.groupby([ 'sex' , 'class' ]). mean(). plot. bar()
@sardarabdullahkhawar8487
@sardarabdullahkhawar8487 2 жыл бұрын
12:30 for i in ks.columns: print(ks[i].unique())
@muhammadsair8594
@muhammadsair8594 2 жыл бұрын
40:32 & 50:06 To See and save plots need to install extensions i)VSCode Plot and ii)Jupyter Notebook Renderers _without these extensions in Dark Theme x and y-axis values are not visible as they are also black and users are not allowed to save and view in zoom the graphs._
@mugheezAhmed
@mugheezAhmed 2 жыл бұрын
Thank you sir n yes it's working now
@Fayez-tk7ph
@Fayez-tk7ph 2 жыл бұрын
Timestamp: 11:16 Assignment - ks[['survived', 'sex', 'parch']].nunique()
@sks8102
@sks8102 2 жыл бұрын
12:09. Finding the code for unique values of more than one columns
@aasimnawaz
@aasimnawaz 2 жыл бұрын
if anyone wanna change to light theme, kindly change from (File>preferences>color theme) short key is , ctrl+k Ctrl+T
@mmateenalihashmi7440
@mmateenalihashmi7440 2 жыл бұрын
(12:40) for col in ks: print(ks[col].unique())
@manazzaayub8430
@manazzaayub8430 2 жыл бұрын
Stamptime 12.27 Assignment How to find unique value of all columns pd.concat([ks['survived'],ks['adult_male'],ks['alive'],ks['sex'],ks['class'],ks['who']]).unique() array([0, 1, 'no', 'yes', 'male', 'female', 'Third', 'First', 'Second', 'man', 'woman', 'child'], dtype=object)
@SajidSpeaks5
@SajidSpeaks5 2 жыл бұрын
12:41 # multiple unique values ks[["age", "class", "alive", "alone"]].nunique() #output age 88 class 3 alive 2 alone 2 dtype: int64
@Bobthemagnificent
@Bobthemagnificent 6 ай бұрын
Great video
@mugheezAhmed
@mugheezAhmed 2 жыл бұрын
40:45 I am unable to save and complete view output images which extension need to be installed? Plz guide anyone thank you in advance :)
@usman1694
@usman1694 21 күн бұрын
31:09 BABAJI agr ks_clean ki age ka mean check kia tha to ks ki age qw update ki ? ks_clean ki hi age update hogi na??
@resreng
@resreng 2 жыл бұрын
For unique values of multiple coloms pd.DataFrame({"values":{col:ks[col].unique() for col in ks}})
@sweela1
@sweela1 2 жыл бұрын
This one best, I want to learn its logic .
@e-learnwithsoniairfan5226
@e-learnwithsoniairfan5226 2 жыл бұрын
36:18 891-712=179, ( where as 177 are age null values, 2 null values are of embarked and 2 are of embark town) ad embark town is string data so only 2 is deducted.
@tahreemzaheer8994
@tahreemzaheer8994 2 жыл бұрын
at 42:39 if the code will be ks_clean.groupby(['sex','class']).mean().plot.bar() it would plot the bar plot. the code was giving an error because of missing ()
@muhammadzohaib8517
@muhammadzohaib8517 2 жыл бұрын
df=pd.DataFrame(ks) unique_values=df.nunique() print(unique_values) Print all Unique value of all columns
@faizasandhu_
@faizasandhu_ 2 жыл бұрын
12:14 ks[["who","survived","age","fare"]].nunique() Output who 3 survived 2 age 88 fare 248 dtype: int64
@humairrazzaq7871
@humairrazzaq7871 2 жыл бұрын
12:52 ks.loc([:,['who','gender']) i hope, it will work mene ye kiya huwa hai warna iloc se get kr skte hain
@muhammadabubakar8930
@muhammadabubakar8930 2 жыл бұрын
#12:17 Assignment ks[['sex','who','age']].nunique() Output: sex 2 who 3 age 83 dtype: int64
@danishnawaz1625
@danishnawaz1625 2 жыл бұрын
12:32 pd.unique(ks[['deck', 'sex']].values.ravel('K'))
@nida7825
@nida7825 2 жыл бұрын
#12:26 Assignment pd.concat([ks['survived'],ks['who'],ks["deck"],ks["sex"],ks["class"]]).unique()
@muhammadaamirkhan5666
@muhammadaamirkhan5666 2 жыл бұрын
love u sir life changing lec
@mansoorjan9238
@mansoorjan9238 2 жыл бұрын
pd.concat([ship['sex'], ship['age'],ship['who']]).unique() for different columns uniqueness.....
@arehman3304
@arehman3304 2 жыл бұрын
Try this one for all coloumn ks[0:].nunique()
@zainulabidin7013
@zainulabidin7013 2 жыл бұрын
11:55 Unique values (ks. ['who'].append(ks['adult_male'])).unique()
@ymentertainment2349
@ymentertainment2349 2 жыл бұрын
#50:03 time pause meray pass yai option hi show ni hota plot save ka ...any one can tell me how to enable this option?
@irfanKhan-ct8ln
@irfanKhan-ct8ln 2 жыл бұрын
Many many thanks sir
@aasimnawaz
@aasimnawaz 2 жыл бұрын
34:31, operators should be defined in parenthesis, ks_clean=ks_clean[ks_clean['age']
@rahatnaqvi
@rahatnaqvi 2 жыл бұрын
Hi I followed same as you mentioned and then ks_clean.head() But doesn't age change to numbers. Any solution please?
@arslanahmad148
@arslanahmad148 2 жыл бұрын
**Assignment#1 :** ks[['sex','who','age','pclass','deck']].nunique() **Output** sex 2 who 3 age 88 pclass 3 deck 7 dtype: int64
@ashhadahmed6026
@ashhadahmed6026 Жыл бұрын
# 12:43 assignment (solution) pd.unique(ks[['who','sex']].values.ravel())
@mumtazhamid
@mumtazhamid 2 жыл бұрын
Masha Allah
@ujala.tasneem2737
@ujala.tasneem2737 2 жыл бұрын
Dark theme was quite Good.
@usmankhanjadoon
@usmankhanjadoon 2 жыл бұрын
At 39:50, how much data can we remove is there any limit, any correlation or justification?
@iqraiqbal3365
@iqraiqbal3365 2 жыл бұрын
very productive lec
@umerfarooq757
@umerfarooq757 2 жыл бұрын
Sir one question we late comers can also summit the assignment or not or if we want then how
@muhammadsair8594
@muhammadsair8594 2 жыл бұрын
11:26 Unique Values of multiple columns # find unique values of same type of data columns. This function will not work if data types are different. column_values = ks[["sex",'who','alive']].values unique_values = np.unique([column_values]) unique_values
@hhamzazaibbhatti1765
@hhamzazaibbhatti1765 2 жыл бұрын
for col in df: print(df[col].unique()) #for all unique values
@syedabdulwahabshah3280
@syedabdulwahabshah3280 2 жыл бұрын
whata about varaible from 2 ,3 ,4 or colums plus check it for int and float values
@kashifraza3339
@kashifraza3339 2 жыл бұрын
27:55 Q: Does normal distribution of Numerical data is necessary for data analysis??
@Codanics
@Codanics 2 жыл бұрын
Yes i will explain later
@tahreemzaheer8994
@tahreemzaheer8994 2 жыл бұрын
57:14 the fare_log box plot has less outliers as compared to the fare
@mugheezAhmed
@mugheezAhmed 2 жыл бұрын
Yes exactly I have too outliers with fairlog but less than fare..
@shahidkamalworld7931
@shahidkamalworld7931 2 жыл бұрын
40:40 option of saving graph and viewing it in separate window is missing for me. How to resolve?
@izharulhaq3296
@izharulhaq3296 2 жыл бұрын
dark theme acha hai sir, I feel comfortable using it.
@asadtariq6080
@asadtariq6080 2 жыл бұрын
43:22 You missed the function brackets after plot.bar ks.clean.groupby(['sex', 'class']).mean().plot.bar()
@shoaibahmeddayo626
@shoaibahmeddayo626 2 жыл бұрын
Thanks bro Dr AAmmar
@InfobyAR
@InfobyAR 2 жыл бұрын
11:23 np.unique(df[['sex', 'who','class']].values)
@syedabdulwahabshah3280
@syedabdulwahabshah3280 2 жыл бұрын
for int and float value it's not working , put (age,survived)and than check TypeError: '
@ameerabbas8619
@ameerabbas8619 2 жыл бұрын
57:41 Sir oper wala box plot x="sex" and y="age" hain y="fare_log" nahi hai es leye out liers show ho rahy hai. baki fare_log ko plot karny se b koch out lier ab b hai. thank you
@ahmedullah8799
@ahmedullah8799 2 жыл бұрын
57:13 the difference is cleaning data from outlierss
@SureshKumar-dw3xs
@SureshKumar-dw3xs 2 жыл бұрын
@57:40 Baba G "fare_log" wale plot ko "age" wale plot se compare kr rahe hn, jb k hamen "fare" wale se comparison krni hai
@usmankhanjadoon
@usmankhanjadoon 2 жыл бұрын
New look...
@kabeerfcc4153
@kabeerfcc4153 2 жыл бұрын
Sir video lectures Jo upload kiye Hein wo kafee Hein python seekhnay k liyee?
@Codanics
@Codanics 2 жыл бұрын
Hanji foran seekh jao jitni jaldi hy ap ko
@zeeshanahmed430
@zeeshanahmed430 2 жыл бұрын
12.30 how to get unique values from multiple or all columns, below is the code. uniq_Values = (sh['survived'].append(sh['pclass']).append(sh['sex']).append(sh['age']).append(sh['sibsp']).append(sh['parch']).append(sh['embarked']) .append(sh['class']).append(sh['who']).append(sh['adult_male']).append(sh['deck']).append(sh['embark_town']).append(sh['alive']).append(sh['alone'])).unique() print(uniq_Values)
@alinaqi8250
@alinaqi8250 5 ай бұрын
Ammar Bhai please make a video for Netcdf(3d and 4d) datasets which are most important for research students. thank you in advance
@ikrambashir8604
@ikrambashir8604 2 жыл бұрын
thank God I fixed the ks in the start
@nasirnauman308
@nasirnauman308 2 жыл бұрын
12:35 assignment
@haseeboffc
@haseeboffc 2 жыл бұрын
12:42 ks[['survived', 'pclass', 'sex', 'age', 'sibsp', 'parch', 'fare', 'embarked', 'class', 'who', 'adult_male', 'deck', 'embark_town', 'alive', 'alone']].nunique()
@sunailahtariq8503
@sunailahtariq8503 2 жыл бұрын
Sir after data cleaning you are comparing survival rate of cleaned and uncleaned data but in actual there was 0 null value in survived column so how null values impact that factor please explain more... And also esa krne se hum data loss nahi kr rae??
@aasukhan3635
@aasukhan3635 2 жыл бұрын
# Assignment1 ks[['survived', 'pclass', 'sex', 'age', 'sibsp', 'parch', 'fare']].nunique() as these are n numbers so we will use n before using unique option.
@Lahori369
@Lahori369 2 жыл бұрын
Superb
@AR-Edzone
@AR-Edzone 2 жыл бұрын
Assignment 01 Column _values =ks[['class', 'alnoe ' ]]. Values.ravel() Unique_values=pd.unique(column_values)
@usman1694
@usman1694 19 күн бұрын
baba ji aap ny ks_clean ki age update karny k bajaye ks ki age update krdi jis sy aagay masla hua lkn maine ks_clean ki hi age update ki video k sath sath practice krty huwe
@syedabdulwahabshah3280
@syedabdulwahabshah3280 2 жыл бұрын
@Codanic while finding unique values when we use string and float or int value ot gives error
@jafarabbas632
@jafarabbas632 2 жыл бұрын
# unique values for multiple columns select_col = tit[['sex', 'who']].values.ravel() unique_val = pd.unique(select_col) unique_val output: array(['male', 'man', 'female', 'woman', 'child'], dtype=object)
@hajraanwar8213
@hajraanwar8213 2 жыл бұрын
57:12 outliers eliminated after log
@hassanorakzai8981
@hassanorakzai8981 2 жыл бұрын
@12:09 ks[['who','class','survived']].nunique()
@usmankhanjadoon
@usmankhanjadoon 2 жыл бұрын
That's great
Statistics for Data Science in Python (Day-16)
35:29
Codanics
Рет қаралды 9 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 6 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,1 МЛН
Exploratory Data Analysis with Pandas Python
40:22
Rob Mulla
Рет қаралды 507 М.
EDA Exploratory Data Analysis in Python
1:07:01
Codanics
Рет қаралды 1 М.
When You Are Nervous to Speak French | Super Easy French 174
10:39
Exploratory Data Analysis in Pandas | Python Pandas Tutorials
32:13
Alex The Analyst
Рет қаралды 152 М.
Exploratory Data Analysis (EDA) in python - Part-1
35:50
Codanics
Рет қаралды 1,9 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 6 МЛН