Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

School_Districts.csv is a dataset that contains names of all the counties and school districts in Nebraska. However, the data uses camel case convention, in which

School_Districts.csv is a dataset that contains names of all the counties and school districts in Nebraska. However, the data uses camel case convention, in which a name formed of multiple words will join all the words together with the first letter of each word capitalized. For example, "Douglas County" is written as "DouglasCounty".

  1. Use regular expression to process the data so that the camel-case words can be turned back to the normal convention with spaces inserted. Below are a few requirements:
    1. In general, case, add a space between two words, e.g. "DouglasCounty" ---> "Douglas County".
    2. If two words are linked by a dash, then keep the dash and do not add the space. E.g. "Exeter-MilliganPublicSchools" ---> "Exeter-Milligan Public Schools".
    3. If two words are linked by a dot, then append the dot with the previous word and add a space. E.g. "St.PaulPublicSchool" ---> "St. Paul Public School".
    4. If there is a number, then separate the number as a word. E.g. "WallacePublicSchoolDistrict65R" ---> "Wallace Public School District 65 R".

Dataset

image text in transcribed

WRITE THE CODE USING REGULAR EXPRESSION IN PYTHON AND SHOW OUTPUT

County AdamsCounty AdamsCounty AdamsCounty AdamsCounty 4 AntelopeCounty 5AntelopeCounty 6 AntelopeCounty ArthurCounty BannerCounty BlaineCounty BooneCounty BooneCounty SchoolDistrict AdamsCentralPublicSchools HastingsPublicSchools KenesawPublicSchools SilverLakePublicSchools ElginPublicSchools NebraskaUnifiedSchoolDistrict1 NelighOakdaleSchools ArthurCountySchools BannerCountvPublicSchools SandhillsPublicSchools BooneCentralSchools RiversideSchoolDistrict75 2 7 10 County AdamsCounty AdamsCounty AdamsCounty AdamsCounty 4 AntelopeCounty 5AntelopeCounty 6 AntelopeCounty ArthurCounty BannerCounty BlaineCounty BooneCounty BooneCounty SchoolDistrict AdamsCentralPublicSchools HastingsPublicSchools KenesawPublicSchools SilverLakePublicSchools ElginPublicSchools NebraskaUnifiedSchoolDistrict1 NelighOakdaleSchools ArthurCountySchools BannerCountvPublicSchools SandhillsPublicSchools BooneCentralSchools RiversideSchoolDistrict75 2 7 10

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_2

Step: 3

blur-text-image_3

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

=+ (b) Use Theorem 12.5 to extend Theorem 33.3 from R1 to R *.

Answered: 1 week ago

Question

What has been your desire for leadership in CVS Health?

Answered: 1 week ago

Question

Question 5) Let n = N and Y Answered: 1 week ago

Answered: 1 week ago