Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is python question I am using matplot and I dataframe. I cannot use different plot library. I made bar chart out of dataframe name

image text in transcribedimage text in transcribed

This is python question I am using matplot and I dataframe. I cannot use different plot library.

I made bar chart out of dataframe name train column PropType.

the PropTyep 1 = family house and 0 is townhouse.

so, when I draw the chart the x label saying 1 or 0 but I need to change this to actual house type. is there any way I can do that without changing dataframe?

10]: 0 0.29 1 0.01 2 0.11 3 0.14 5 0.01 6 0.14 7 0.01 9 0.09 10 0.01 12 0.07 13 0.09 16 0.07 17 0.09 18 0.08 Acres Deck GaragCap Latitude Longitude LstPrice Patio PkgSpacs PropType SoldPrice Taxes TotBed TotBth TotSqf YearBlt 5.0 5,415 1998 1.0 924 1965 1.0 1.702 1940 2.0 1,756 1940 2.0 1,3681976 3.0 2,956 1950 2.0 1,085 1968 2.0 1,5391916 3.0 2,113 1985 1.0 1,082 1891 3.0 3,387 1986 1.0 1,211 1939 0.0 2,726 1889 0 1,656 1907 3 40.779524 -111.893542 725000 0 40.773243 -111.883291 205000 0 40.773972 -111.867470 390000 1 40.783009 -111.872100 445000 2 40.771693 -111.886951 339000 2 40.783889 -111.872194 600000 0 40.775431 -111.873783 209900 0 40.775075 -111.872260 399900 140.772489 -111.884959 450000 0 40.772800 111.877568 300000 1 40.781456 111.891783 489900 0 40.784531 -111.872999 359500 1 40.771684 111.866400 225000 1 40.776419 -111.68179 359000 1 752000 7244 0 205000 1431 1 390000 1816 1 443000 3260 0 334000 2141 1 570000 4197 0 215000 1478 1 3990002207 0 445500 2904 1 300000 2077 1 478250 4232 1 360000 1762 1 225000 1554 368000 1767 4.0 3.0 2.0 1 # bar chart of property type 2 3bartrain PropType'.value_counts ().plot (kind-'bar, figsize-(14,8), title- "House type" House type 200 175 150 125 100 75 50 25

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions