#๐Ÿ”’ Data Visualization Help

32 messages ยท Page 1 of 1 (latest)

tiny garnet
spare copperBOT
#

@tiny garnet

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.

tiny garnet
#

The column name median income is there

stuck marten
#

@tiny garnet please show the whole traceback as text

#

that is, the whole error message. show the whole thing, no matter how cluttered it looks.

tiny garnet
#

That the erro message as way too long to paste here

stuck marten
#

sure

#

can you do print(filtered_neighborhoods.columns) in a new cell and show the whole output in this chat? @tiny garnet

tiny garnet
#

Index(['longitude_x', 'latitude_x', 'housing_median_age_x', 'total_rooms_x',
'total_bedrooms_x', 'population_x', 'households', 'median_income_x',
'median_house_value_x', 'ocean_proximity_x', 'total_rooms_avg_x',
'total_bedrooms_avg_x', 'population_avg_x', 'households_avg_x',
'bedrooms_diff_x', 'longitude_y', 'latitude_y', 'housing_median_age_y',
'total_rooms_y', 'total_bedrooms_y', 'population_y', 'median_income_y',
'median_house_value_y', 'ocean_proximity_y', 'total_rooms_avg_y',
'total_bedrooms_avg_y', 'population_avg_y', 'households_avg_y',
'bedrooms_diff_y'],
dtype='object')

stuck marten
tiny garnet
#

Yes

stuck marten
#

you use pd.concat for that, not merge

#

merge is for SQL-style joins

#

!docs pandas.concat

spare copperBOT
#

pandas.concat(objs, *, axis=0, join='outer', ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False, sort=False, copy=None)```
Concatenate pandas objects along a particular axis.

Allows optional set logic along the other axes.

Can also add a layer of hierarchical indexing on the concatenation axis, which may be useful if the labels are the same (or overlapping) on the passed axis number.
tiny garnet
#

Where do I should that as what partt of the code then

stuck marten
tiny garnet
#

I see the concat as do now but need two arguements and not one

#

I see it now

#

filtered_neighborhoods = pd.concat([low_income_neighborhoods, high_value_neighborhoods])

stuck marten
#

there are examples of how to use pd.concat to vertically stack dataframes

tiny garnet
#

Okayu

#

@stuck marten thank you for that

#

I got a question for you if that is okay

#

I am learning C for a class and so I been using codeacademy and youtube to help me learn that as that okay to use or not as I got all the classes done for C that can be offered in codeacademy

stuck marten
tiny garnet
#

Yes as that is correct as it is operatinf system and parallelism

#

!close

spare copperBOT
#
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.