Machine Learning

Pandas iloc vs loc

Pandas iloc VS loc

When it comes to data wrangling in pandas, the iloc and loc method comes to our mind. The iloc and loc methods  in pandas are used for selection and indexing of rows and columns. However, they differ in terms of how they handle indexing.    What is .iloc in python? Iloc (index location) is integer

Pandas iloc VS loc Read More »

python list comprehension

Python list comprehension

What is list comprehension in python? List comprehension gives you a more concise and straightforward way of creating new lists using loops compared to the traditional approach of creating new list. Which makes our code easier to read and understand. List comprehension is a trait of intermediate-level developers. We often see list comprehension questions in

Python list comprehension Read More »

Numpy where with-multiple condition

NumPy where with multiple conditions

Tired of wrangling data in Numpy using nested if, elif and else statements. Making your code bulky and difficult to read code quickly as logic gets tangled. Don’t worry, we have  “Numpy where”, the function can handle data wrangling. Numpy where function is a master of arrays manipulator, effortlessly picking and choosing elements based on

NumPy where with multiple conditions Read More »