How to print just one column in pandas

0 votes
I have imported a csv file using pandas. The file has headers: Name, Place, Contact, Status. Now I want to print only the name column. How can I do that?
Apr 4, 2019 in Python by Raj
10,873 views

1 answer to this question.

0 votes

You can use the header to print the required column. Something like this:

import pandas as pd
file = read_csv(‘example.csv’)
print(file[‘Name’])
answered Apr 4, 2019 by TIna

Related Questions In Python

+1 vote
3 answers

How to print one pandas column without index?

There is a slight mistake in what ...READ MORE

answered Mar 28, 2019 in Python by Shri
64,355 views
0 votes
1 answer
0 votes
1 answer

How to replace entire column in pandas dataframe?

Use the dataframe with respective column names ...READ MORE

answered May 8, 2019 in Python by John
13,887 views
0 votes
1 answer

How to select a single column in Pandas?

Pandas allows you to index the dataframe ...READ MORE

answered May 9, 2019 in Python by Suman
1,072 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,466 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,126 views
+1 vote
4 answers

How to install tkinter in pycharm?

Ya, this is a problem with installing ...READ MORE

answered Apr 4, 2019 in Python by Jishan
87,909 views
+1 vote
5 answers

How to read Pandas csv file with no header?

Use this logic, if header is present ...READ MORE

answered Mar 14, 2020 in Python by Shahabuddin
• 160 points
231,877 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