#๐Ÿ”’ i need help with pandas

63 messages ยท Page 1 of 1 (latest)

tropic warrenBOT
#

@slow ermine

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

slow ermine
#

how can I solve it

#

cuz with csv reading works

#

but with excel not

#

i need help

stoic nymph
#

did you install openpyxl?

sturdy epoch
#

@slow ermine you just have to install openpyxl

slow ermine
#

ok I'll try then I'll let you know

sturdy epoch
#

don't be afraid of error messages. in this case, it told you exactly what the problem was, and the solution.

slow ermine
#

when I type pip install openpyxl it in the terminal it gives me an error

sturdy epoch
slow ermine
#

tht error is in italian

sturdy epoch
#

that's fine.

slow ermine
#

pip : Termine 'pip' non riconosciuto come nome di cmdlet, funzione, programma eseguibile o file script. Controllare l'ortografia del nome o verificare che il percorso sia incluso e corretto, quindi riprovare.
In riga:1 car:1

  • pip install openpyxl
  •   + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
sturdy epoch
#

what command do you do to run the program?

slow ermine
#

pip install openpyxl

sturdy epoch
#

that's to pip install. not to run the program

slow ermine
#

yes

sturdy epoch
#

I need the command that you use to run the python program that you are writing

slow ermine
#

ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl.

sturdy epoch
#

what command did you do to get that error message?

slow ermine
#

that the program message

#

mport pandas as pd

file = pd.read_excel('rubi.xlsx')
print(file)

sturdy epoch
#

please show a screenshot of your terminal

#

@slow ermine

slow ermine
#

im doing the screenshoot

sturdy epoch
slow ermine
#

i think i have to reinstall python

sturdy epoch
#

no

#

please show what comes before that text in the terminal

#

@slow ermine if you have started trying to reinstall python, I will not be able to help

slow ermine
#

i tried to install openpyxl

sturdy epoch
# slow ermine

I need to know what happens immediately before this appears on your terminal

#

you haven't shown that yet

#

you've shown the output of a hidden command. I need to know the command.

slow ermine
sturdy epoch
# slow ermine

what's the command that you enter that does all of this?

slow ermine
#

import pandas as pd

file = pd.read_excel('rubi.xlsx')
print(file)

tropic warrenBOT
#

Hey @slow ermine!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
sturdy epoch
slow ermine
#

i know

sturdy epoch
#

how do you run the python program? are you pushing a button?

slow ermine
#

yes

sturdy epoch
#

what button

slow ermine
#

i clicked excecute pytohn file

sturdy epoch
#

okay. put this at the top of that python file

import sys; print('venv is', sys.executable); exit()

and then run the python file, and copy and paste the output as text (no screenshot) into this chat

#

@slow ermine please ping me when you have done that

slow ermine
#

it give me no output

#

@sturdy epoch

sturdy epoch
#

okay, in powershell, try this

python -m pip install openpyxl

and then run the program again

#

but if that doesn't work, I unfortunately don't have more time to help.

slow ermine
#

thank you now it works!

sturdy epoch
#

oh, and delete import sys; print('venv is', sys.executable); exit() from the program

#

hmm, okay

slow ermine
#

i already deleted

sturdy epoch
#

well use python -m pip any time you want to use pip

#

instead of just pip

slow ermine
#

ok

tropic warrenBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ i need help with pandas