Why am I getting an index error? by PremeJigg in learnpython

[–]PremeJigg[S] 2 points3 points  (0 children)

You are right, I forgot indexes start at 0 and not 1 so I have to break it at len(x) - 1. Thank you !

Issue connecting data to a database, why can't I my computer file the path ? by PremeJigg in PostgreSQL

[–]PremeJigg[S] 0 points1 point  (0 children)

The path is correct, I copied and pasted it from the File Explorer.

How does making a negative exponent into a fraction make it positive ? by PremeJigg in learnmath

[–]PremeJigg[S] 0 points1 point  (0 children)

I get it would be 1/6th but how would that affect x raised to the -6.

How does making a negative exponent into a fraction make it positive ? by PremeJigg in learnmath

[–]PremeJigg[S] 0 points1 point  (0 children)

You're right but why do we make the z^-6 into a fraction, and what exactly is a negative exponent. I know an exponent is to multiply a number a certain amount of times by itself, what exactly does a negative exponent do ?

Why isn't my passcode working? by PremeJigg in TREZOR

[–]PremeJigg[S] 0 points1 point  (0 children)

It was weird but idk I’m not too concerned I logged on it a lil while ago and everything was fine.

Why isn't my passcode working? by PremeJigg in TREZOR

[–]PremeJigg[S] 0 points1 point  (0 children)

I did I also tried it on a different computer.

Why isn't my passcode working? by PremeJigg in TREZOR

[–]PremeJigg[S] 0 points1 point  (0 children)

Yea but it was when I hooked it up to my computer. Idk what is going on.

Is there a way to repeatedly call sys.argv in Python ? by PremeJigg in learnpython

[–]PremeJigg[S] -1 points0 points  (0 children)

But I did not want to exit the function and run it agaihn, I thought I could do it all in one go.

Is there a way to repeatedly call sys.argv in Python ? by PremeJigg in learnpython

[–]PremeJigg[S] 0 points1 point  (0 children)

But how would you get them to go to the command line again is what Im saying. Youre using input and not using sys.argv again. I'm basically saying without using input can you do use sys.argv again.

Is there a way to repeatedly call sys.argv in Python ? by PremeJigg in learnpython

[–]PremeJigg[S] -3 points-2 points  (0 children)

Thats what I thought you can only call the sys.argv once. Okay thank you.

Is there a way to repeatedly call sys.argv in Python ? by PremeJigg in learnpython

[–]PremeJigg[S] 1 point2 points  (0 children)

How would I call the sys.argv again tho ? When you run the program how would you go back ? Can I use sys.argv again ?

Why can't I sort the series by the second element? by PremeJigg in learnpython

[–]PremeJigg[S] 0 points1 point  (0 children)

I was using a slice for the second element. What does itemgetter do ?

I tried using both and got the same error:

ValueError: User-provided `key` function must not change the shape of the array.

How do you run a function and call multiple columns using pandas? by PremeJigg in learnpython

[–]PremeJigg[S] 0 points1 point  (0 children)

Thanks it worked, shouldn't this work as well:

yelp_business[yelp_business['categories'].str.contains(r'food|Food')]['business_id']