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 3 in Python by Raj
7 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 3 by TIna

Related Questions In Python

0 votes
1 answer

How to print one pandas column without index?

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

answered Mar 28 in Python by Shri
51 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 in Python by John
7 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 in Python by Suman
8 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 920 points
19 views
+4 votes
6 answers
0 votes
1 answer

How to install tkinter in pycharm?

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

answered Apr 3 in Python by Jishan
641 views
0 votes
1 answer

How to read Pandas csv file with no header?

You can set the header option to ...READ MORE

answered Apr 3 in Python by Shri
10 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.