Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8764369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:01:05+00:00 2026-06-13T16:01:05+00:00

Assuming I have the following CSV file: User ID Name Application 001 Ajohns ABI

  • 0

Assuming I have the following CSV file:

User ID   Name        Application  

001       Ajohns      ABI
002       Fjerry      Central
900       Xknight     RFC
300       JollK       QDI
078       Demik       Central

Is there some easy way to (import this into some data structure)? and/or be able to easily perform the following operations in python:

1) Get all user IDs with Application=Central
2) Get the row where name="FJerry" then extract say the "userid" value from
3) Give me the filtered rows for those with "Application=Central" so I can write out to CSV
4) Give me all the rows where Name="Ajohn", and Application="ABI" such that I could easy do a len() to count them up?

Is there some python library or what is the easiest way to accomplish the above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:01:06+00:00Added an answer on June 13, 2026 at 4:01 pm

    Trivial using DictReader. You need to pass excel-tab as the dialect since your fields are tab delimited.

    rows is a list of dictionaries.

    >>> with open(r'd:\file.csv','rb') as f:
    ...     reader = csv.DictReader(f,dialect='excel-tab')
    ...     rows = list(reader)
    ...
    >>> [x['User ID'] for x in rows if x['Application'] == 'Central']
    ['002', '078']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assuming I have the following: my @net = (`echo HELLO > file`, `less file`);
assuming that I have following xml: <ns5:OrderTotal> <ns5:Name>AmountPaid</ns5:Name> <ns5:Description>Payment Received</ns5:Description> <ns5:SortOrder>4</ns5:SortOrder> <ns5:Value>16.95</ns5:Value> </ns5:OrderTotal> <ns5:OrderTotal>
Assuming I have the following, data from a field: Category Name ------------- Games Movies
Assuming I have the following classes in an application: A base class: public abstract
Assuming I have the following (simplified) models in a GAE Java application: Entity project
Assuming I have something like the following: var address = {id: 100, name: Gregg,
assuming I have the following array: views = [ { :user_id => 1, :viewed_at
Assuming I have the following two JQuery functions - The first, which works: $(#myLink_931).click(function
Assuming I have the following strings: string str1 = Hello World!; string str2 =
Assuming you have the following XML: <?xml version=1.0 encoding=utf-8?> <content> <info> <media> <image> <info>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.