Python Pandas Create series using list of values

0 votes

Hi. I have a list of values using which I want to create a Pandas Series. Please tell me how to do it. The list of values is as follows:

[1, 3, 5, 6, 8]
May 9, 2019 in Python by Ritu
1,023 views

1 answer to this question.

0 votes

You can do this using series method. Refer to the below code:

s = pd.Series([1, 3, 5, 6, 8])
print(s)
0    1.0
1    3.0
2    5.0
3    6.0
4    8.0
dtype: float64
answered May 9, 2019 by Yogi

Related Questions In Python

0 votes
1 answer

How to create Pandas dataframe from Python list?

You can do it like this: import ...READ MORE

answered Apr 6, 2019 in Python by Likhita
954 views
0 votes
1 answer

How do I create 3 X 4 array of random numbers between 0 and 100 using python?

Use numpy in the following manner: np.random.rand(3,4)*100 When you ...READ MORE

answered May 24, 2019 in Python by Radhika
1,915 views
0 votes
1 answer

How do I create a star using the turtle module of python?

Hey @Jinu, Try something like this: import turtle star = ...READ MORE

answered Jun 22, 2019 in Python by Neha
1,355 views
0 votes
1 answer
0 votes
1 answer

How to create Pandas series from dictionary?

Here's a sample script: import pandas as pd import ...READ MORE

answered Apr 1, 2019 in Python by Prateek
2,129 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,060 views
0 votes
1 answer

What is the recommended way to randomize a list of strings using Python?

Hi. Nice question. Here is the simplified answer ...READ MORE

answered Jan 18, 2019 in Python by Nymeria
• 3,560 points
612 views
+1 vote
8 answers

Count the frequency of an item in a python list

To count the number of appearances: from collections ...READ MORE

answered Oct 18, 2018 in Python by tinitales
35,243 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP