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

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

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

TERMINOLOGIES

These are some of the terminologies you needed to understand the machine learning. model A mathematical representation of a real world process; a predictive model forecasts a future outcome based on past behaviors. training The process of creating a model from the training data. The data is fed into the training algorithm, which learn a … Continue reading TERMINOLOGIES

Design a site like this with WordPress.com
Get started