- 7 months ago
- #dataselection
- #pandasiloc
- #pythonfiltering
Learn how to select specific rows, columns, or even ranges of data using iloc and loc. These are powerful tools to slice and filter your DataFrames like a pro.
#DataSelection #PandasIloc #PythonFiltering
#DataSelection #PandasIloc #PythonFiltering
Category
📚
LearningTranscript
00:00In this lecture, we have data selection and data view.
00:04We have data.
00:06Imagine that you can see all the data.
00:09You can see the first few frames.
00:11Then, what do we do?
00:13Here we have data, which has all the data.
00:19You can see all the data.
00:21Basically, you can see a function call.
00:24You can see head.
00:26If you want to see the first five elements,
00:30you can see the total.
00:32Now, what if you want to see the first five elements?
00:38Then what?
00:39If you want to see the first five elements,
00:42you can see the head.
00:45You can see the eight elements.
00:48You can run the first eight elements.
00:52If you want to see the first eight or five elements,
00:57you can see the last five elements.
01:02You can see the number of elements.
01:04You can see the number of elements.
01:06You can see the top.
01:08You can see the bottom.
01:10You can see the tail.
01:12If you want to see the other elements.
01:17Here you can see the part of this step.
01:24You can see the total elements are slower than you.
01:25Now, hey,
01:26you can see the same name of tail.
01:30You can see the number,
01:31where you can see the them elements,
01:33For example, I will use six elements to execute.
01:36If you look at the tail of six elements,
01:39there are two things. Head or tail.
01:42Head is top 5, tail is bottom 5.
01:46If you look at the number of custom number of elements.
01:52Good.
01:54Let's move on.
01:56One is, in which way we use indexing or location to use the elements?
02:05Indexing or location to use the individual data or elements,
02:11which you look at the rows and columns,
02:13we can access them.
02:15So, I will say index or location.
02:19Okay, location.
02:21Now, I press skip and press.
02:24Shift and enter.
02:26Index for location.
02:27Okay.
02:28Now, I have a list.
02:31Let's say birds.
02:34Birds.
02:36Birds.
02:37We have a dummy series.
02:40Series.
02:42Series.
02:43Series.
02:44Is it.
02:45Flow?
02:51How do youston?
02:55Camerion
02:56Does the sound of stone alST am descendants?
02:57Oh, look.
02:58Yes, the likely
02:58Machine parks.
02:59All the kanske.
03:00Beispielienах.
03:01Charities.
03:02Achilles.
03:03Campus.
03:04Crow.
03:05People.
03:06Swing.
03:07Donkey
03:08Nobody.
03:10What about snakes?
03:12It's not a same.
03:13donkey go parr lager na pyrndha ban ga na donkey
03:16to yeh dekhiye winged donkey
03:19or then hemahre paas eek or bird
03:23hai or usko kehtae hai eagle
03:25to hemahre paas ji yeh 5
03:28yun semjh lijiye birds a gaye
03:30ap
03:31hem yahan peh iski indexing bhi dhe saktay
03:34misal ke tawar peh mein katao ya rinky joh indexing hai
03:37woh proportional hooghi
03:40joh number yahan pe aayega misal ke tawar peh
03:41my katao zero let's say three let's say nine
03:44let's say eight let's say five
03:48balke
03:49replicate kar djetay
03:51acha yeh hemahre paas ji indexing location
03:53a gaay
03:54acha jih
03:55ab
03:56may isko execute karne laga hum
03:57yeh dhekhiye shift enter keretay
03:59yeh hemahre paas execute cancel keretay hum
04:01execute karo bhi
04:03execute hooghya
04:04agar mein yehaan peh kehtae hum birds
04:05enter keretay hum
04:06to yeh hemahre paas bird aaga
04:07acha yeh to baat hume
04:09yehaan teak toh thik hai
04:10pata hai
04:11ab
04:12dho function hai
04:13ek index
04:14uđthata hai
04:15aur dhusara location uđthata hai
04:17joh index wala hai
04:19usko kehtetay hai
04:20loc
04:21thik hai
04:23jnke dot loc
04:24se usko represent keretay hai
04:25jab bhi dot loc
04:26ka function call kerengi
04:27woh index
04:28uđthayega
04:28aur jab bhi
04:30aap dot
04:31i loc
04:32ka function call kerengi
04:33woh
04:33kiya kerega
04:34uski position
04:35uđthayega
04:35woh kiishe
04:37abhi zara
04:37abhna goor kerna
04:38yeh joh
04:39aapko
04:39number
04:40nazer
04:41ariya nha
04:41yeh basically
04:42indexing
04:43hae
04:43agar
04:44aap
04:44winged
04:45donkey
04:46ko
04:46uđthana
04:46chahathe
04:47hae
04:47uđthana
04:47to aap
04:48btayye
04:49iski index
04:50kya hai
04:50aur iski
04:51position
04:51kya hai
04:52iski index
04:53joh hai
04:54woh eight
04:54iski position
04:56joh hai
04:56woh one
04:56two
04:56three
04:57four
04:57hai
04:57abh winged
04:59donkey
04:59ko
04:59pkdnay
05:00lage
05:00aap
05:02zara
05:02apne goor
05:02kerna
05:03yeh
05:03mere
05:03pas
05:03ji
05:03hai
05:03bird
05:04birds
05:04usko
05:06upre
05:06may
05:06kata
05:06ho
05:06dot
05:07loc
05:07thik
05:08kai
05:08or
05:08dot
05:09loc
05:09ko
05:09aap
05:09nai
05:09dheni
05:10ho
05:10tia
05:10hai
05:11position
05:12location
05:14ab
05:15dhekhe
05:15my
05:15isko
05:15dheta
05:16ho
05:16eight
05:17eight
05:17kya hai
05:18iski
05:18index
05:18hai
05:18or
05:19my
05:19run
05:19kata
05:20ho
05:20winged
05:21donkey
05:21kya
05:21aap
05:22ishi
05:22winged
05:22donkey
05:23ko
05:23dhusere
05:23tariqe
05:23se bhi
05:24pkd
05:24sakta
05:24ho
05:24using
05:25iski
05:25location
05:26ab
05:27wo
05:27kais
05:27se
05:27my
05:28isko
05:28kata
05:28ho
05:28i
05:29loc
05:29or
05:29iski
05:30location
05:30kya
05:30hai
05:30one
05:31two
05:33three
05:34four
05:36to
05:36yeh
05:37four
05:37hai
05:37i
05:37lock
05:38use
05:38kar
05:38ke
05:38four
05:44chokhe
05:45mein
05:45ng
05:45ghalat
05:45counting
05:46ki
05:46basically
05:46kya
05:47kya
05:50hai
05:50four
05:51chokhe
05:54basically
05:54kya
05:54hai
05:54ghalat
05:55hai
05:55kya
05:55kya
05:55index
05:56joh
05:56hai
05:57location
05:57joh
05:57woh
05:58zero
05:58se
05:58start
05:58hote
05:58zero
05:59one
06:00two
06:01three
06:02and
06:02four
06:03as
06:04you
06:04see
06:04yeh
06:05dhek
06:05yeh
06:05three
06:06location
06:06hai
06:06may
06:07isko
06:07execute
06:07kata
06:07ho
06:08or
06:08we
06:08get
06:09the
06:09same
06:09result
06:10thik
06:11hai
06:11na
06:11to
06:12humari
06:12joh
06:12position
06:13hai
06:13woh
06:13zero
06:14se
06:14shru
06:14hote
06:14hai
06:14and
06:15index
06:15bhi
06:15emara
06:15zero
06:16se
06:16shru
06:16hote
06:16is
06:16chiz
06:17kya
06:17rakhna
06:17hai
06:17ab
06:18zara
06:18my
06:18is
06:18tera
06:18kata
06:18hon
06:19ya
06:19hai
06:19harbam
06:19isko
06:19par
06:20istamal
06:20kata
06:20kata
06:20hai
06:20dhek
06:21kya
06:21kya
06:21faun
06:22data
06:22kya
06:23kya
06:23kya
06:23run
06:23kya
06:23kya
06:24kya
06:25kya
06:25kya
06:25kya
06:25kya
06:26kya
06:26kya
06:26kya
06:27iphone
06:28iphone
06:29ya
06:29se
06:29ڈیٹا میں سے آئی فون مجھے نکال دیں کیسے نکالیں گے آپ اس کو اٹھائیں گے ٹھیک ہے دونوں
06:34طریقے سے لوگ سے اور آئی لوگ دونوں سے نکالنا ہے پوزیشن اور انڈیکسنگ سے
06:38انڈیکسنگ تو یار مجھے سیدھا سیدھا نظر آ رہی ہے تین ہے تو میں یہاں پہ ڈاٹ لوگ کا
06:43فنکشن کال کرتا ہوں پیرانتیسی میں تین دیتا ہوں ایکزیکیوٹ کرتا ہوں آئی فون
06:46اس میں تو کوئی پرابلم نہیں ہے ٹھیک ہے نا چلے اب میں اس طرح کرتا ہوں
06:50اس کو اس کی پوزیشن سے ہم ایکسٹریکٹ کرتے ہیں تو میں کہتا ہوں ڈائیٹ آئی لوگ
06:54اور آئی لوگ کے اندر میں کونسی ویلیو دوں چلو کاؤنٹ کرتے ہیں
06:58زیرو وان ٹو تھری تو اس کی لوکیشن بھی جو ہے نا وہ بھی تھری ہے
07:08تو میں اس کو ایکزیکیوٹ کرتا ہوں اور آپ کے پاس آئی فون آگیا
07:11ایکسی لینٹو مومنٹو
07:14اچھا اب میں آپ کو ریال میجک دکھاتا ہوں
07:19آئی لوگ کا
07:20آئی لوگ کا میں آپ کو میجک دکھاتا ہوں
07:24لوکیشن تو انڈیکسن کو ایکسیس کرتے ہیں
07:26تو میں یہاں پر لکھ دیتا ہوں
07:27انڈیکسن
07:29ہیویور یہ ایکسیس کرتی ہے پوزیشن
07:34اب میں آپ کو اس کا میجک دکھانے لگا ہوں آئی لوگ کا
07:37غور کرنا آپ نے
07:38جس طرح آپ نے پائیتھون کے اندر سیکھا
07:42کہ آپ لسٹ سلائسنگ کرتے تھے
07:45یاد ہے نا آپ کو سٹرنگ سلائسنگ کرتے تھے ہم لوگ
07:47اور اس میں انڈیکس دیتے تھے
07:49سٹارٹ تو انڈ
07:50وہی ایکسیس کام آپ آئی لوگ سے کرتے ہیں
07:54اب جب آپ نے غور کرنا ہے
07:56میں پہلے تین ایلیمنٹ اٹھانے لگا ہوں
07:57تو میں نے کیا کہا
07:59ایوریتھنگ انٹل
08:01پوزیشن تھری
08:03میں اس کو ایکسی کیوٹ کرتا ہوں
08:04پہلے تین ایلیمنٹ آپ کے پاس آگئے
08:06اور کیچھائیے
08:07مزا آیا
08:08اب جب آپ نے غور کرنا ہے
08:10یہ جو کام ہم نے کیا
08:13یہ ایگزیکٹ کام
08:14ہم ہیڈ سے بھی کر سکتے ہیں
08:16وہ کیسے
08:16جب آپ نے غور کرنا ہے
08:17ہمارے پاس یہ ویریبل ہے
08:19میں اس کو کہتا ہوں
08:19فون ڈاٹ
08:20سی ایس وی
08:22انڈر سکور سی ایس وی
08:23انڈر سکور سی ایس وی
08:26ٹھیک ہے
08:26ڈاٹ
08:27یہی کرتے تھے نا ہیڈ سے
08:28اور ہیڈ کو ہم نمبر اف ایلیمنٹ دیتے تھے
08:30لیٹسے میں تین دے دیتا ہوں
08:31اور ایگزیکٹ کرتے ہیں
08:32تو پہلے تین آگئے
08:33تو ہیڈ اور آئی لوگ
08:35سے آپ ایک ہی کام لے سکتے ہیں
08:37ٹھیک ہے
08:40اوکے جی
08:41چلے
08:41لیٹس موو فردر
08:42اب
08:43آپ کو یہاں پہ
08:45کولم نیم نظر آ رہے ہیں
08:46ٹھیک ہے
08:47اب آپ کولم نیمز کو
08:49لیٹسے اگر
08:50آپ ڈیٹا
08:51ڈیٹس آنا چاہتے ہیں
08:52مثال کے طور پر
08:52یہاں پہ
08:53آپ چاہتے ہیں کہ
08:55مجھے مل جائے
08:56لیٹسے
08:57منوفیکچر
09:01منوفیکچر کولم کے اندر
09:03نیم ہے نا
09:04وہ سارے سارے
09:05یہاں پہ آپ کو
09:06ڈیسپلے ہو جائیں گے
09:07صحیح ہے
09:08اب یہی کام
09:10آپ ایک اور طریقے سے
09:11بھی کر سکتے ہیں
09:12وہ کیسے
09:13آپ کہیں
09:13فون انڈرسکور
09:14سی ایس وی
09:14ڈاٹ میک
09:16جو نام ہے نا
09:17ڈاٹ میک
09:17اس کو ایزے
09:18ایزے اٹریبیوٹ
09:19کال کریں
09:19رن کریں
09:20you will get
09:21the same result
09:21is this cool
09:24yes
09:24it's the very cool
09:25اب میں آپ کو
09:26ایک پرابلم بتاتا ہوں
09:27ڈاٹ میک کے اندر
09:28پرابلم کیا ہے
09:29اب آپ نے غور کیا
09:31یہاں پہ
09:31let's say
09:32میرے پاس ایک ہے
09:33سیم کارڈ
09:34اور سیم کارڈ
09:36کے نام کے ترتیب
09:37ایسے ہے کہ
09:37ان کے درمیان
09:37سپیس ہے
09:38ایسا یا نا
09:39چلے
09:39اب اس کو
09:40کال کر کے دیکھتے ہیں
09:41دیکھتے ہیں
09:41کیا یہ دونوں
09:41میتھڈ کے لئے
09:42کام کرتا ہے
09:42کہ نہیں کرتا
09:43واپس آیا
09:44یہاں پہ
09:45کافی گیا
09:45اور میں اس کو
09:46کہتا ہوں
09:46copy کرو
09:47name
09:47copy کرو
09:48یہ والا
09:49name
09:49کرو
09:50copy
09:50copy
09:51اور یہاں پہ
09:52کرو
09:53paste
09:53ٹھیک ہے
09:54run کیا
09:55سیم کارڈ
09:55شو ہو گئے
09:56very good
09:56یہی expect
09:57کر رہے تھے
09:58ہم
09:58however
09:59میں ذرا
10:00دوسرے
10:00میتھڈ سے
10:00اس کو
10:01access کرتا ہوں
10:01کہتا ہوں
10:02dot
10:03sim
10:03cards
10:04صحیح ہے
10:07اب ذرا
10:08آپ نے غور کرنا ہے
10:09اوی
10:10یہ تو
10:11error آگیا
10:11تو اس کا
10:12مطلب یہ ہے
10:14کہ
10:14ہمارا جو
10:15attribute
10:16declare
10:17کرنے والا
10:17یہ جو
10:18dot
10:18method
10:19ہے
10:19جس سے
10:19آپ
10:20کسی بھی
10:20call
10:21کو
10:21access
10:21کرتے ہیں
10:22does
10:24not
10:24work
10:25when
10:26there
10:26a
10:27space
10:29in
10:30the
10:30column
10:31name
10:32ٹھیک ہے
10:34بات
10:34تو آپ
10:35نے یہ
10:35بات
10:36اپنے
10:36ذہن
10:37میں
10:37رکھنی
10:37ہے
10:37کہ
10:37اگر
10:38کوئی
10:38space
10:38ہوگی
10:39تو
10:39it
10:39will
10:40not
10:41work
10:41اچھا
10:42اوکے
10:43clear
10:45ہوگی
10:45جی
10:45بات
10:45ہمیں
10:46تو
10:46یہاں
10:47پہ
10:47میں
10:47اس
10:47کو
10:47چھوڑ دیتا
10:48ہوں
10:48ایک
10:49آخری
10:49چیز
10:49میں
10:50یہاں
10:50پہ
10:50discuss
10:50کرنا
10:51جاتا
10:51ہوں
10:51وہ
10:51یہ
10:51کہ
10:53conditionally
10:55کس طریقے
10:56سے
10:56ہم
10:56data
10:57select
10:57کر
10:57سکتے ہیں
10:58ہمارے
10:58data
10:58set
10:59میں
10:59سے
10:59مثال
10:59کے
10:59طور پر
11:00یہ
11:00دیکھئی
11:00یہ
11:00میرا
11:00data
11:01frame
11:01ہے
11:01میں
11:01اس
11:01کو
11:01execute
11:02کرتا
11:02ہوں
11:02یہ
11:02میرے
11:02پاس
11:03data
11:03آیا
11:03اب
11:04آپ
11:04چاہتے ہیں
11:04کہ
11:05جتنا
11:06بھی
11:06میرے
11:06پاس
11:07white
11:07color
11:08کی
11:08گاڑی
11:08ہے
11:08نا
11:08آج
11:11میرے
11:11پاس
11:11white
11:12color
11:12کا
11:12phone
11:13آج
11:13میرے
11:13پاس
11:13تو
11:14white
11:15color
11:15کا
11:15phone
11:15کس
11:15طریقے
11:16سے
11:16آپ
11:16select
11:16کریں
11:16گے
11:17اس
11:17کے
11:17لیے
11:17آپ
11:18condition
11:19لگا
11:20سکتے ہیں
11:20ایسے
11:20آپ
11:21کہیں
11:21یہ
11:21میرا
11:22data
11:22set
11:22ہے
11:22اب
11:23اس
11:24data
11:24set
11:24کے
11:24اندر
11:25جس
11:25طرح
11:25آپ
11:25column
11:26دیتے
11:26ہیں
11:26اس
11:27طرح
11:27آپ
11:28نے
11:28دینا
11:29ہے
11:29دوبارہ
11:29وہ
11:29data
11:30set
11:30اور
11:31کہنا
11:31ہے
11:31کہ
11:31اس
11:32کا
11:32column
11:32اٹھانا
11:33ہے
11:33اس
11:33کا
11:34نام
11:34ہے
11:34color
11:34صحیح
11:36ہے
11:36لیکن
11:37of
11:37course
11:38string
11:38ہے
11:38آپ
11:39نے
11:39کہنا
11:39ہے
11:39color
11:40اٹھانا
11:40color
11:40column
11:41تو
11:41یہ
11:41color
11:41سارا
11:42اس
11:42نے
11:42اٹھا
11:42لیا
11:42however
11:44اب
11:44آپ
11:44اس
11:44کو
11:44filter
11:45کر
11:45سکتے
11:45ہیں
11:45using
11:46comparison
11:47operator
11:47اور
11:47آپ
11:48کہیں
11:48مجھے
11:48چاہیے
11:49bt
11:50ٹھیک
11:50ہے
11:51اور
11:51white
11:52کے
11:52spelling
11:52ٹھیک
11:52لگنا
11:53white
11:53مجھے
11:54یہ
11:54چاہیے
11:55آپ
11:56نے
11:56بیسیکلی
11:56یہ کیا
11:57کیا
11:57یہ
11:57single
11:57آپ
11:58نے
11:58column
11:59define
11:59کیا
11:59ہے
11:59لیکن
12:00column
12:00کے
12:00اوپر
12:00condition
12:01لگائی
12:01ہوئی
12:01کہ
12:01column
12:02select
12:02کرو
12:02لیکن
12:02column
12:03جو
12:03ہے
12:03اس
12:03کی
12:03value
12:03white
12:04ہونی
12:04چاہیے
12:04میں
12:05اس
12:05کو
12:05execute
12:05کرتا
12:05ہوں
12:05آپ
12:06نے
12:06غور
12:06کرنا
12:06ہے
12:06one
12:07two
12:07three
12:08oh
12:09man
12:11ہمارے
12:12پاس
12:12سارے
12:12white
12:13color
12:14والے
12:14Nokia
12:15اور
12:15Motorola
12:15آ
12:16گئے
12:16ہیں
12:16ٹھیک
12:18ہے
12:18تو
12:18چلیئے
12:18ایک
12:18اور
12:19example
12:19میں
12:19آپ
12:19دکھاتا
12:19ہوں
12:19مثال
12:20کے
12:20طور
12:20پر
12:20آپ
12:21چاہتے ہیں
12:21کہ
12:21میرے
12:21پاس
12:21وہ
12:22phone
12:22آئے
12:23جس
12:23کی
12:23price
12:23220
12:24سے
12:25above
12:26ہو
12:26یا
12:27220
12:27سے
12:28below
12:28ہو
12:28دیکھ
12:29لیتا
12:30ہے
12:30no
12:30problem
12:30again
12:32آپ
12:33نے
12:33پورا
12:33data
12:33frame
12:33اٹھانا
12:34ٹھیک
12:35اب
12:37آپ
12:38نے
12:38کہنا
12:38کہ
12:38اس
12:39کا
12:39column
12:40ہے
12:40وہ
12:41کون
12:41سا
12:41select
12:42کرنا
12:42ہے
12:42تو
12:42یہاں
12:42پہ
12:42آئیں
12:43گے
12:43اس
12:43data
12:43frame
12:44کو
12:44کہیں
12:44گے
12:44تمہارا
12:45جو
12:45column
12:45میں
12:46select
12:46کرنا
12:46ہے
12:46وہ
12:47price
12:47آپ
12:48نے
12:48select
12:48کیا
12:48price
12:49لیکن
12:50price
12:50کے
12:50اوپر
12:50condition
12:51لگانی
12:51ہے
12:51نا
12:51ہم
12:51نے
12:52تو
12:52price
12:53اوپر
12:53condition
12:53لگانی
12:54ہے
12:54تو
12:54آپ
12:54یہاں
12:54پہ
12:54کہیں
12:54تمہاری
12:55شوڈ
12:56بی
12:56greater
12:56than
12:57کتنا
12:58ہونی
12:58چاہیے
12:58جتنا
12:59آپ
12:59کو
12:59اچھی
12:59لگے
12:59مثال
13:00کے
13:00طور
13:00پہ
13:00میں
13:00کہتا
13:01ہوں
13:01یار
13:02آپ
13:02کی
13:02price
13:02450
13:03سے
13:03زیادہ
13:03ہونی
13:03چاہیے
13:03لیٹ
13:04سے
13:04جتنا
13:09آپ
13:09کو
13:09اچھی
13:09لگے
13:09مثال
13:10کے
13:10طور
13:10پہ
13:10میں
13:10کہتا
13:10ہوں
13:11یار
13:11آپ
13:12کی
13:12price
13:12450
13:13سے
13:13زیادہ
13:13ہونی
13:13چاہیے
13:13لیٹ
13:14سے
13:14وہ
13:14مجھے
13:15انٹریز
13:15دکھاؤ
13:15جن کی
13:16price
13:16450
13:16سے
13:17زیادہ
13:17ہے
13:17ہونی
13:18یہاں
13:18پہ
13:18ایک
13:19problem
13:19ہوگا
13:19یہ
13:20run
13:20نہیں
13:20ہوگا
13:20لیکن
13:21یہ
13:21run
13:21اس
13:21وجہ
13:22سے
13:22نہیں
13:22ہوگا
13:22کہ ہماری
13:22command
13:23غلط
13:23ہے
13:23یہ
13:23run
13:23اس
13:24لیے
13:24نہیں
13:24ہوگا
13:25کہ
13:25ہمارے
13:25پاس
13:25price
13:26data
13:26type
13:27ہے
13:27object
13:27data
13:27type
13:28اگر
13:28آپ
13:28کو
13:28یاد
13:28دو
13:29تو
13:29اس
13:29لیے
13:29object
13:30data
13:30type
13:30کے
13:31اوپر
13:31will
13:32not
13:32work
13:32however
13:33ہم
13:33اس
13:34طرح
13:34کرتے
13:34ہم
13:34یہ
13:34کام
13:35memory
13:35kb
13:35کے
13:35اوپر
13:36کرتے
13:36اور
13:36میں
13:36کہتا ہوں
13:36یار
13:36memory
13:37ہمیں
13:37show
13:37کراؤ
13:38جو
13:38کہ
13:38basically
13:386000
13:39سے
13:39above
13:39ہے
13:39میں
13:40اس
13:40کو
13:40یہاں
13:40پہ
13:406000
13:41ڈالتا
13:41ہوں
13:41اور
13:41اس
13:43کو
13:44اور
13:45میں
13:45اس
13:45کو
13:45memory
13:45پہ
13:45لے
13:45آتا
13:46ہوں
13:46اور
13:46اس
13:46کو
13:46execute
13:47کرتے
Be the first to comment