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 8000179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:42:51+00:00 2026-06-04T15:42:51+00:00

I have a tab delimited table that has multiple columns (1500) and a few

  • 0

I have a tab delimited table that has multiple columns (1500) and a few rows (10).

Basically how do I make my program look at the columns instead of through the rows? I need to count and organize the columns based on whats in them.

One example is counting how many entries are in the columns that are not ‘-‘.

I think itertools.groupby may be what I’m looking for but I don’t know the syntax or if it is even the right thing.

I have been learning programming/python for two weeks so I don’t know how to do a lot. Thank you for any help you can give me.

  • 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-04T15:42:53+00:00Added an answer on June 4, 2026 at 3:42 pm

    Thank you everyone for your help! I tried each of them and they all did as described and could probably be incorporated into my code (if I was better at python). What I found to work the best for what I was doing to the columns was this:

    table = []
    for each_line in homefile:
    ##doesn't include first line
            arr1 = each_line.strip("\n").split('\t')
            table.append(arr1)
    ##created a list of lists(matrix); each row as one entry in table(list)
    cols = zip(*table)
    ##this switches rows and columns
    

    Then I was able to do stuff to each column while just treating each as a list containing the entries from each column of the original tab delimited table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data set that has two tab delimited columns that I plot
I have tab delimited data that I am exporting a select few columns into
I have a tab-delimited file that has over 200 million lines. What's the fastest
I have a 2GB big text file, it has 5 columns delimited by tab.
I have a Tab-delimited String (representing a table) that is passed to my method.
I have tab delimited data with multiple columns. I have OS names in column
I have a tab delimited file of 4 columns and n number of rows.
Let's say I have a tab-delimited text file that contains data arranged in columns
I have a file that is tab-delimited and contains multiple tables each headed by
I have a tab delimited file on a shared path. I've setup that flat

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.