PYTHON PANDAS loc[] & iloc[]

.loc[] .loc[]/ is used to select/access a subset from a DataFrame using row/column names. Syntax: <DataFrameObject>.loc[<start row>: <end row>,<start column>:<end column>] To access a row: <DF object>.loc[<row label>,:] To access multiple rows: <DF object>.loc[<start row>:<end row>,:] To access selective columns: <DF object>.loc[:,<start column>:<end column>] To access range of columns and rows: <DF object>.loc[<start row>:<end row>,<start … Continue reading PYTHON PANDAS loc[] & iloc[]

ZFILL IN PYTHON

The zfill() method adds zeros (0) at the beginning of the string, until it reaches the specific length. If the value of the len parameter is less than the length of the string, no filling is done. Syntax: string.zfill(len) parameter: len A number specifying the position of the element you want to remove. EXAMPLES: a=”hello” … Continue reading ZFILL IN PYTHON

TOP CAREER PATHS IN PYTHON

Which field you want to go after learning python. I have listed the top career paths in python. WEB DEVELOPMENT Python is a powerful language with simple and easy to learn syntax which makes it unique and popular among web developers. Python is a server side language. You need to learn frontend technology along with … Continue reading TOP CAREER PATHS IN PYTHON

LINEAR REGRESSION-PYTHON

Linear regression is one of the supervised Machine learning algorithms in Python that observes continuous features and predicts an outcome. Depending on whether it runs on a single variable or on many features, we can call it simple linear regression or multiple linear regression. This is one of the most popular Python ML algorithms and often … Continue reading LINEAR REGRESSION-PYTHON

PYTHON BUILD-IN FUNCTIONS

LEN() Len function take an iterable object and returns the numbers of items in an object. Example: >>items = [1,2,3,4] >>print(len(items)) Output :4 ZIP() Zip function can take nth iterable objects and return a zip object which is an iterator of tuples. Example: >>ids=[1,2,3] >>names=[‘a’,’b’,’c’] zipobj=zip(ids,names) print(list(z)) Output: [(1,’a’),(2,’b’)'(3,’c’)] ORD() Ord function return a number … Continue reading PYTHON BUILD-IN FUNCTIONS

SORTING ALGORITHMS IN PYTHON

INSERTION SORT Insertion sort algorithm places an unsorted element at its suitable place in each iteration and it’s suitable place in each iteration and it’s similar as we sort cards in our hand in a card game. It is efficient for smaller data sets, but very inefficient for larger lists. COMPLEXITY OF INSERTION SORT Time … Continue reading SORTING ALGORITHMS IN PYTHON

ROCK PAPER SCISSORS IN PYTHON

Rock Paper Scissors, a very famous game which you might have enjoyed with your friends but now it is the time to enjoy the same game using Python. Rock paper scissors is a hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are “rock”, … Continue reading ROCK PAPER SCISSORS IN PYTHON

COLLECTION MODULE IN PYTHON

The Python Collection module is defined as a container that is used to store collections of data, for example – list, dict, set, and tuple, etc. It was introduced to improve the functionalities of the built-in collection containers. Python collection module was first introduced in its 2.4 release. There are different types of collection modules … Continue reading COLLECTION MODULE IN PYTHON

Design a site like this with WordPress.com
Get started