Answered step by step
Verified Expert Solution
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".
- 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:
- In general, case, add a space between two words, e.g. "DouglasCounty" ---> "Douglas County".
- 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".
- 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".
- If there is a number, then separate the number as a word. E.g. "WallacePublicSchoolDistrict65R" ---> "Wallace Public School District 65 R".
Dataset
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 10Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started