0

First of all I am very sorry if this is a common questions, however I am still very new in the programming world, and cannot figure out the keywords for what I'm actually looking for.

Basically I have an Excel spreadsheet with data Picture of Excel Sheet - For each identifier I have a 0 or a 1. My task is to copy the number in the identifier column, paste it into a webpage from my workplace and click a button to exclude the customer from billing. Once I have done this, I will go back to the Excel spreadsheet and change the number from 0 to 1. Since there is a lot to go through, I thought this would be a fun project for me to start learning a basic script. I did not make it very far though!

import pandas as pd 

Migreringer = pd.read_excel('Migreringer.xls')

ExludeBilling = Migreringer[["Exclude Billing", "Identifier"]]

IsExcludedBilling = Migreringer["Exclude Billing"] > 0

I was hoping that someone was able to give me a good idea as to how to move on from here, My idea is that it would check each row for the True/False statement from IsExcludedBilling, and then as a start copy the identifier if the statement is False and paste it into a word document or something similar to test this out? I just cannot seem to figure out how to make Python go through each row and validate the statements, and then make it copy something from a different column in the same row to a different document?

I know from experience that I am more motivated in learning with a project in mind, so that is why I've chosen to start here. Maybe I should take a couple of steps back before engaging with a project like this?

1 Answer 1

1

do you wan this ?

df = pd.DataFrame(
    {
        'Exclude Billing': [1,0,0,1,0],
        'Identifier': [ 41823,41835,41819,41798,41812],
    }
)
df_zero=df.loc[df['Exclude Billing']==0,:]
df_zero.to_csv('data_with_zero.csv',index=False)
Sign up to request clarification or add additional context in comments.

2 Comments

That would definietly be a start, how would I go about adding the actual numbers from my sheet with this?
@SimonKianzad with df=pd.read_excel(your_files) and then you df_zero=df.loc…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.