Quick Thread : 5 Cool Advanced Pandas Techniques for Data Scientists

πŸ§΅πŸ‘‡πŸ»
#Python #DataScience #MachineLearning #DataScientist #Programming #Coding #100DaysofCode #hubofml #Pandas
1. Split data using pandas
In the code below, we are splitting the data into a random sample of rows and removing them from the original data after dropping index values.
2. Binning Data
Binning is a technique to group/bin your data into multiple buckets which is very helpful if you dealing with continuous numeric data. In pandas you can bin the data using functions cut and cut. First check the shape of your data i.e no of rows and columns.
3. Slicing using loc and iloc functions
You can do position based and label based slicing using iloc and loc functions respectively.
4. Mean Imputation and Interpolate method
Mean Imputation is a technique in which the missing value is replaced by the mean of available data in the chosen column.
5. Combining Data using Concat and Join
Just like in numpy, pd.concat() function is used for concatenation of Series or DataFrame objects in pandas.
6. Want to know more? Join us : 60 days of Data Science and Machine Learning
medium.com/coders-mojo/qu…

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Naina Chaturvedi

Naina Chaturvedi Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @NainaChaturved8

24 Sep
Pandas is a fast, powerful, flexible and open source data analysis and manipulation tool.

A Mega thread 🧡covering 10 amazing Pandas hacks and how to efficiently use it(with Code Implementation)πŸ‘‡πŸ»
#Python #DataScientist #Programming #MachineLearning #100DaysofCode #DataScience
1/ Indexing data frames
Indexing means to selecting all/particular rows and columns of data from a DataFrame. In pandas it can be done using two constructs β€”
.loc() : location based
It has methods like scalar label, list of labels, slice object etc
.iloc() : Interger based
2/ Slicing data frames
In order to slice by labels you can use loc() attribute of the DataFrame.

Implementation β€”
Read 17 tweets
23 Sep
Projects Alert : 140 Python Projects with Source Code
You don't have to go to a university or pay hefty tuition to learn ML when you can learn for FREE.

An extensive list of 100+ Most Valuable Github Repository for ML, beginner to advanced.
theinsaneapp.com/2021/09/best-g…
#Python #DataScientist #Programming #Machinelearning #100DaysofCode
Read 5 tweets
20 Sep
10 Amazing Advanced Python Constructs that you can use to write efficient and clean Code
A Thread πŸ§΅πŸ‘‡πŸ»
#Python #TensorFlow #DataScientist #Programming #Coding #100DaysofCode #DataScience #AI #MachineLearning
1/ DefaultDict
In python, a dictionary is a container that holds key-value pairs. Keys must be unique, immutable objects. If you try to access or modify keys that don’t exist in the dictionary, it raise a KeyError & break up your code execution ( continued..)
2/ (Continued..)To tackle this issue,Python defaultdict type, a dictionary-like class is used.If you try to access or modify a missing key,then defaultdict will automatically create the key & generate a default value for it
A defaultdict will never raise a KeyError ( Continued..)
Read 18 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(