BU 451 Unit 2 data import and inspection script example

Programming for Business Analytics Herzing University Free custom sample in 24 to 48h

This BU 451 Unit 2 sample paper presents a script that loads a composite paddle rental company's 2025 data and proves what it loaded before anything is interpreted. Herzing BU 451, Programming for Business Analytics, belongs to the business analytics degree, and this unit keeps inspection separate from cleaning. The script reads each file once, reports shape and types, checks required columns, counts missing and distinct values, and saves its report by code. One reading decision is made: ZIP codes stay text so leading zeros survive. The report finds 18,640 rentals across eleven columns, prices stored as text because of dollar signs, site codes in six spellings, dates stored as text and 263 missing return times. Everything found is handed to the cleaning unit.

CourseBU 451 Programming for Business Analytics
UnitUnit 2
Paper typeData import and inspection script
LengthAbout 790 words, 5 pages
FormatAPA 7 student paper
SchoolHerzing University
ProgramBS in Business Analytics
UpdatedSeptember 2026

Free sample paper for BU 451 Unit 2

1

18,640 Rows, Eleven Columns and a Price Column That Arrived as Text: A Data Import and Inspection Script for a Composite Paddle Rental Company's 2025 Season

Student Name

Business, Herzing University

BU 451: Programming for Business Analytics

Instructor Name

January 28, 2026

What this page is doingThe title reports what the script proved it loaded, including the first problem it found. It signals that the script inspects and reports rather than fixing or interpreting.
2

18,640 Rows, Eleven Columns and a Price Column That Arrived as Text: A Data Import and Inspection Script for a Composite Paddle Rental Company's 2025 Season

What the Script Must Prove

Script 02_import_inspect.py is the first to open the data for Riverbend Paddle Co., the composite Chattanooga kayak and paddleboard rental company whose 2025 season this course analyzes. Its job is narrow. It reads each supplied file once, reports how many rows and columns it found and the type Python assigned to every column, checks that the fields later scripts depend on are present, counts missing values, and then stops. It changes nothing and draws no conclusions. Anything it finds wrong is recorded for the cleaning script in the next unit, where every fix will be made in code.

Keeping inspection separate from cleaning matters because a script that loads and fixes data in one pass hides what the raw file looked like. McKinney (2022) recommends inspecting the structure and types of a newly loaded table before working with it, since a column read with the wrong type can silently change every calculation that follows.

How the Script Is Built

The script uses the relative paths set up in Unit 1 and runs top to bottom. The main steps are shown with the essential line of code for each.

StepEssential codePurpose
1. Locate filesRAW = ROOT / "data" / "raw"Relative path from the project root
2. Read rentalsrentals = pd.read_csv(RAW / "rentals_2025.csv", dtype={"customer_zip": str})Read once; keep ZIP codes as text so leading zeros survive
3. Report shapeprint(rentals.shape)Rows and columns
4. Report typesprint(rentals.dtypes)Type assigned to each column
5. Check required fieldsmissing_cols = REQUIRED.difference(rentals.columns)Stop with a message if any required column is absent
6. Count missing valuesprint(rentals.isna().sum())Missing values per column
7. Count distinct valuesprint(rentals.nunique())Spot unexpected codes
8. Repeat for other filesSame steps for sites, fleet and weatherEvery file inspected the same way
9. Write reportreport.to_csv(OUT / "02_inspection.csv")Output saved by code, not copied from the screen

Only one decision is made while reading: customer ZIP codes are read as text. A ZIP code is a label, not a number, and reading it as a number would turn a Massachusetts code such as 02134 into 2134. That is not a cleaning step but a correct reading of the file's meaning, and it is noted in a comment beside the line.

What this page is doingThe script reads once, reports, and stops, and its one reading decision is justified in place. Inspection kept separate from cleaning is what lets the next unit show exactly what it changed.
3

What the Script Reported

The rentals file loaded with 18,640 rows and 11 columns. All eleven required columns were present. The table shows the type Python assigned to each and the number of missing values.

ColumnType assignedMissingDistinct valuesNote for cleaning
rental_idinteger018,640Unique, as expected
site_idtext06Three sites, but six spellings
rental_datetext0207Read as text, not as dates
start_timetext096Read as text
return_timetext263118Missing for 263 rentals
craft_typetext05Codes to check against fleet list
pricetext074Read as text because some values include a dollar sign
party_sizeinteger08Range 1 to 8
customer_ziptext312,907Kept as text by design
booking_channeltext03online, phone, walk-up
waiver_signedtext02Y and N

Three findings need attention in the next unit. The price column arrived as text because 412 values were entered with a leading dollar sign, and one text value in a column makes the whole column text; no arithmetic on prices is possible until that is fixed. Site codes appear in six spellings, CHA-1, CHA-2 and CHA-3 plus lower-case versions of each in 57 rows, which would split each site in two in any grouped result. And rental dates and times are text, so the season's calendar cannot yet be analyzed. The 263 missing return times may be real, rentals whose return was not logged, or they may reflect a process at one site; the inspection does not guess which.

The other three files were inspected the same way. The sites file has three rows and four columns, as expected. The fleet file has 86 rows, one per craft, with five craft type codes that match those in the rentals file. The weather file has 214 rows, one per day from April 1 to October 31, 2025, with no missing values; the rentals file has 207 distinct dates, because the company closed for seven days of high water and storms.

Why the Report Is Saved, Not Copied

The inspection results are written to a file by the script rather than copied from the screen into the paper. That choice follows the rule that every result should be traceable to the code that produced it (Sandve et al., 2013). If the raw file is ever replaced, for example with a corrected export from the company's booking system, rerunning the script regenerates the report, and a comparison of the old and new reports shows exactly what changed. A screenshot or a pasted table would record only what the file looked like on one day. The saved report also becomes the reference for the cleaning script: each fix in the next unit cites the line of this report that made it necessary, so a reader can move from problem to correction without guessing.

Where the Script Stops

The last line writes the inspection report to output/02_inspection.csv and prints "Inspection complete. No data changed." The script does not compute revenue, rentals per site or any other result, even though a quick total would be tempting. Wilson et al. (2017) recommend keeping raw data untouched and letting each script do one job, and a total calculated here, on a price column still stored as text, would be wrong. If a required column were ever missing, the script would stop at step 5 with a message naming the column, rather than failing later with an error that points somewhere else. The first real calculations wait until the cleaning script has made the data fit for them. Riverbend Paddle Co. and its files are composites for this course.

References

McKinney, W. (2022). Python for data analysis: Data wrangling with pandas, NumPy, and Jupyter (3rd ed.). O'Reilly Media.

Sandve, G. K., Nekrutenko, A., Taylor, J., & Hovig, E. (2013). Ten simple rules for reproducible computational research. PLOS Computational Biology, 9(10), Article e1003285. https://doi.org/10.1371/journal.pcbi.1003285

Wilson, G., Bryan, J., Cranston, K., Kitzes, J., Nederbragt, L., & Teal, T. K. (2017). Good enough practices in scientific computing. PLOS Computational Biology, 13(6), Article e1005510. https://doi.org/10.1371/journal.pcbi.1005510

What the BU 451 Unit 2 instructions ask for

BU 451 Unit 2 asks students to write a script that imports a supplied data file and inspects it. Typical requirements are reading the file once, reporting its dimensions and the type of each column, confirming that fields needed later exist, summarizing missing and distinct values and stopping before any interpretation. Many instructors ask students to explain what should be done if the file will not load and how much output is appropriate. Inspection should not quietly fix problems; findings are passed to the cleaning step. The submission usually includes the script, its saved output and a short explanation in APA 7, with the key code lines shown beside their purpose.

How this BU 451 Unit 2 example is built

The paper starts by stating the script's narrow job and why inspection is kept apart from cleaning. A table walks through nine steps, each with its essential line of code and purpose, followed by the reasoning for reading ZIP codes as text. A second table reports every column's assigned type, missing count, distinct values and a note for cleaning. A findings section explains the three problems that matter most and inspects the other three files, reconciling the number of rental dates with the weather file. A section explains why the report is saved rather than copied. The paper ends by describing where the script stops and why it computes no totals.

Reading the BU 451 Unit 2 rubric

Import script rubrics usually score correct loading, complete structural reporting, checks for required fields, clear documentation of findings and restraint from premature analysis, plus presentation. Loading earns full credit when the file is read once with appropriate options stated. Structural reporting scores highest when types, missing values and distinct counts are all shown. Required-field checks reward stopping with a clear message if a column is absent. Findings documentation earns points when problems are described precisely enough for the next step to act on them. The restraint criterion rewards scripts that do not compute totals on uninspected data. Instructors also credit output saved by code rather than pasted from a screen.

BU 451 Unit 2 help before you submit

Import scripts commonly lose points by cleaning data while loading it, so the raw state is never documented. Another frequent problem is ignoring column types, leaving numbers stored as text that silently break later calculations. Students often print entire tables instead of summaries, burying the useful information. Some never check that required columns exist, so failures appear later with confusing errors. ZIP codes and account numbers are regularly read as numbers, losing leading zeros. Others calculate totals immediately, on columns not yet fit for arithmetic. Finally, inspecting a file exported from a job raises privacy concerns; a supplied or composite file shows the same skills without exposing real customer records.

Get a BU 451 Unit 2 example written to your instructions

We start from the assignment page and the BU 451 rubric your section posts, together with the dataset the unit supplies. The custom example reads the file once with its options written out, reports shape, coverage and types as printed numbers, records what was expected beside what arrived, and stops before cleaning. First one free, returned in 24 to 48 hours.

More BU 451 papers and business analytics samples

BU 451 Unit 2 questions, answered

How much output should the script print?

Enough that a reader can tell what the file is without opening it, and no more. A handful of counts, a type listing and a small sample of records answer the criterion; a dump of every row answers nothing and hides the parts that matter. Where your section fixes a format for the output, follow it exactly rather than adding to it.

What if the supplied file will not load?

That is a finding worth writing down rather than a problem to hide. Record what the read reported, what you changed about the options, and what finally worked, because an encoding or a stray delimiter is exactly the sort of thing the unit wants documented. A script that quietly works on the second attempt teaches a reader nothing about the file.

Could I inspect a file exported from my job instead?

No, and the export is the problem rather than the inspection. An extract pulled from an employer system carries that organization's records with it, and stripping names does not change who owns the rows or who agreed to their use. The dataset attached to the unit exists so the work can be submitted, graded and kept without any of that risk.

Where can I find a free BU 451 Unit 2 sample paper?

A full BU 451 Unit 2 data import and inspection script is free above, including the step table, the column report and margin notes. Working with a different supplied file? Forward the prompt and we describe an inspection script for it at no cost, typically in 48 hours.

How much should the BU 451 Unit 2 script print?

Summaries, not whole tables: shape, column types, missing and distinct counts, and any required column missing. The sample saves its report to a file so the findings can be compared if the data are refreshed.