Have Queries? Talk to our Career Counselor for more Guidance on picking the right career for you!
LIST
TUPLES
Slicing is used to access parts of sequences like lists, tuples, and strings. The syntax of slicing is-[start:end:step]. The step can be omitted as well. When we write [start:end] this returns all the elements of the sequence from the start (inclusive) till the end-1 element. If the start or end element is negative i, it means the ith element from the end. The step indicates the jump or how many elements have to be skipped. Eg. if there is a list- [1,2,3,4,5,6,7,8]. Then [-1:2:2] will return elements starting from the last element till the third element by printing every second element.i.e. [8,6,4].
The dataframes in python can be combined in the following ways-
1. Concatenating them by stacking the 2 dataframes vertically.
2. Concatenating them by stacking the 2 dataframes horizontally.
3. Combining them on a common column. This is referred to as joining.
The concat() function is used to concatenate two dataframes. Its syntax is- pd.concat([dataframe1, dataframe2]).
Dataframes are joined together on a common column called a key. When we combine all the rows in dataframe it is union and the join used is outer join. While, when we combine the common rows or intersection, the join used is the inner join. Its syntax is- pd.concat([dataframe1, dataframe2], axis=’axis’, join=’type_of_join)
A function is a block of code which is executed only when it is called. To define a Python function the def keyword is used.
Consider the example shown below:
1
2
3
4 from random import shuffle
x = [‘Keep’, ‘The’, ‘Blue’, ‘Flag’, ‘Flying’, ‘High’]
shuffle(x)
print(x)
The output of the following code is as below.
[‘Flying’, ‘Keep’, ‘Blue’, ‘High’, ‘The’, ‘Flag’]
Class in Python is created using the class keyword.
Example:
1
2
3
4
5 class Employee:
def __init__(self, name):
self.name = name
E1=Employee(“abc”)
print(E1.name)
Output: abc
1
2
3
4 def pyfunc(r):
for x in range(r):
print(‘ ‘*(r-x-1)+’*’*(2*x+1))
pyfunc(9)
Output:
*
***
*****
*******
*********
***********
*************
***************
*****************
1
2
3
4
5
6
7
8
9
10 a=int(input(“enter number”))
if a=1:
for x in range(2,a):
if(a%x)==0:
print(“not prime”)
break
else:
print(“Prime”)
else:
print(“not prime”)
Output:
enter number 3
Prime
Instructor
LED Live
Online Training
Instructor
LED Classroom
Training
Customized and Exclusive training based on your requirement.
Customized Corporate Training
The trainers are very professionals and friendly. Our trainers are passionate for training the students and well versed with concepts of modules and the students doubts will be also cleared in a good manner.
We offer world class teaching and top-notch training to help you discover and groom the technical ability in you. We provide best-in-class infrastructure, online resources, and exposure to you in this world of IT.
When we Certify a Professional , he knows exactly how to deliver a successful project. So get certified, showcase your skills and share your knowledge. Earning certification helps you as an IT professional establish credibility with both your employer and the greater IT industry.
Our fees is very normal and affordable to all the students in all their criteria.
Our Training classes offers flexible training options including Class room and online /off line training for your learning needs. Choose what to learn, and when and how to learn it. With our trainers or accredited instructors in a hands-on learning environment.
In placement, we support you in all the ways by giving you well training in your prescribed domain in which will you be able to handle by your own and well versed.