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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:47:59+00:00 2026-05-30T17:47:59+00:00

Actually i am reading an Excel sheet using python i know how to slice

  • 0

Actually i am reading an Excel sheet using python i know how to slice the rows based on no’s,but what i want is to slice row values based on row values…
For example:

       col1  col2  col3
      ---------------
row1 | sss   2     3
row2 | ppp   4     5
row3 | vvv   6     7

I need to slice row but using row values like slice(col0,sss,vvv) like this i want.so that if any row order changes also i can access that row values based on name.

I dont need like this slice(0,4,6)…pls help me thanks in advance

  • 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-05-30T17:48:00+00:00Added an answer on May 30, 2026 at 5:48 pm

    so that if any row order changes also i can access that row values
    based on name.

    Based on that fragment and the diagram, you possibly want something like this (untested):

    rd = {}
    for rowx in xrange(1, sheet.nrows):
        cell = sheet.cell(rowx, 0)
        if cell.ctype != xlrd.XL_CELL_TEXT: continue
        cv = cell.value.strip()
        if not cv: continue
        if cv in rd:
            complain_about_duplicate_row_names()
        rd[cv] = sheet.row_values(rowx)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have found some ways but they are actually reading frames and applying transition
Actually I'm writing a small application (WinForms + C#), where I'm reading the Excel
I want to do something which I thought is simple. Actually with the python
I believe (from some research reading) that counting down in for-loops is actually more
Are these actually three different concepts or am I getting jumbled? (I've been reading
My question actually consists of multiple questions. I'm frequently reading about companies who deploy
Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest
i am actually reading Doctrine Reference: One to Many, Unidirectional with Join table .
I'm just starting out in Ruby (Rails actually) and the book I'm reading covers
I've got a Stream object and I am using BeginRead to begin reading (obviously)

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.