+ 2

Using VSCode Visual Studio Code Editor to run my program for DOOR TO FREEDOM

My Door To Freedom is bugging out I well post both the code and terrminal errors. please help me CODE import pandas as pd data = { 'Name': ['John'], 'Street Name': ['Scorch'], 'Intrests': ['Unknown'], 'Body Piercings':['nose ring,two eyebrow lips, left ear,both nipples,belly button'], 'Body Art': ['Sculp Fire Colors'], 'Active Addict': ['y'], 'Addict':['y'], 'AA Member': ['n'], 'Job 1': ['Drug Dealer'], 'Job 2': ['Unknown Job Gang'], 'Gang Name': ['Unnamed'], 'Instrument': ['Drums'], 'Hair Style': ['Very Tall, Sharp Five Point Mohawk'], 'Hair Color': ['Flames Red & Yellow'], 'Face': ['Sunking In Cheekbones & Eyes'], 'Skin': ['Jaundice'], 'Eye Color': ['Unknown'], 'Body Type': ['Severly Under Weight'], 'Race': ['Undecided'], 'Fashion': ['Topless, Designer Jeans, Studded Gold Black u Belt, Converse Sneakers'] } df = pd.DataFrame(data, index=['Name']) print (df['Name']) df = pd.DataFrame(data, index=['Street Name']) print (df['Street Name']) df = pd.DataFrame(data, index= ['Intrests']) print (df['Intrests']) df = pd.DataFrame(data, index= ['Body Piercings']) print (df['Body Piercings']) df = pd.DataFrame(data, index= ['Body Art']) print (df['Body Art']) df = pd.DataFrame(data, index= ['Active Addict']) print (df['Active Addict']) df = pd.DataFrame(data, index= ['Addict']) print (df['Addict']) df = pd.DataFrame(data, index= ['AA Member']) print (df['AA Member']) df = pd.DataFrame(data, index= ['Job 1']) print (df['Job 2']) df = pd.DataFrame(data, index= ['Gang Name']) print (df['Gang Name']) df = pd.DataFrame(data, index= ['Instrument']) print (df['Instrument']) df = pd.DataFrame(data, index= ['Hair Style']) print (df['Hair Style']) df = pd.DataFrame(data, index= ['Hair Color']) print (df['Hair Color']) df = pd.DataFrame(data, index= ['Face']) print (df['Face']) df = pd.DataFrame(data, index= ['Skin']) print (df['Skin']) df = pd.DataFrame(data, index= ['Ey

14th Nov 2021, 9:20 PM
Bionical Man
Bionical Man - avatar
13 Respostas
15th Nov 2021, 1:57 PM
SoloProg
SoloProg - avatar
+ 3
First check if you have panda module installed
16th Nov 2021, 2:44 PM
Musharraf
Musharraf - avatar
+ 2
df = pd.DataFrame(data) for k, v in df.items(): print(f'{k} :', ''.join(v)) # Keep learning & happy coding :D
14th Nov 2021, 11:19 PM
SoloProg
SoloProg - avatar
+ 2
Have you checked your environment variables? If you can't even get a simple print('Hello World') to run, then vscode is definitely not finding any Python interpreter. https://code.visualstudio.com/docs/languages/python SoloProg's suggestion is a way to print out the items in your dataframe, but you said you can't even get Python to work in Vscode. Or maybe the Python your Vscode is using does not have Pandas installed?
15th Nov 2021, 8:17 AM
Bob_Li
Bob_Li - avatar
+ 2
Thanks so much Bob_Li I wanted it 2 be 2 Colums not 1 I don't know what I did I'm wrong
15th Nov 2021, 11:51 AM
Bionical Man
Bionical Man - avatar
+ 2
Bob_Li is the first step to go to python.org and download python if so I did that
15th Nov 2021, 8:43 PM
Bionical Man
Bionical Man - avatar
+ 2
I'm currently trying to sort out my info and I haven't found an oop lesson than makes sense
16th Nov 2021, 3:43 AM
Bionical Man
Bionical Man - avatar
+ 1
Bob_Li bob_Li SoloProg @Vitya @ I can't even get python to import even though it and other libraries including PIP & ANACONDA are installed I can't even get python to import even though it and other libraries including PIP & ANACONDA are installed
15th Nov 2021, 5:04 AM
Bionical Man
Bionical Man - avatar
+ 1
Here is a way of displaying your data. I omitted a lot of details from your example as it is only a sample. https://code.sololearn.com/c8Vk9dGuSwfo/?ref=app I hope you can get your Vscode setup in order.
15th Nov 2021, 9:05 AM
Bob_Li
Bob_Li - avatar
+ 1
Then open your computer's environment variable settings and make sure that the Python location is added to the path list. Open Vscode and see if it works. pip install your pandas and other modules as needed. Visual Studio installs it's own Python, Vscode uses externally installed Python and uses the environment variables to find them.
16th Nov 2021, 3:06 AM
Bob_Li
Bob_Li - avatar
+ 1
I'm curious why you're using dataframe. One would think that you would be using OOP to structure your data for a game...
16th Nov 2021, 3:36 AM
Bob_Li
Bob_Li - avatar
+ 1
Learning OOP should be on your to-do list. Sololearn have lessons on it for various languages, but the principle is basically the same, more or less. The advantage is that later on you could add methods and define how it would react to other classes and the environment... Here is a quick try on how I would start it based on your sample I hope you are successful in getting your Python up and running in Vscode. https://code.sololearn.com/cbVSEc0dpEg6/?ref=app
16th Nov 2021, 3:48 AM
Bob_Li
Bob_Li - avatar
0
SoloProg plz elaborate
14th Nov 2021, 11:23 PM
Bionical Man
Bionical Man - avatar