Create a comma-separated file containing multiple cdrs in


Question: Phone records Telecom operators such as AT&T or Verizon maintain records of all the calls made using their network (named "call detail records," or CDRs). Usually, the CDRs are collected at the routers within the telecom networks, and millions of CDRs are stored in a single file. Although most of the records are in correct format, some records (a handful) either do not contain all the requisite fields or contain garbled data; these records cause problems during any data processing Consider a simplified version of a CDR that has only four fields: date and time of the call, source number, destination number, and duration of the call.

Create a comma-separated file containing multiple CDRs. In that file include some erroneous or incomplete records that: Do not have duration of the call (no duration, no billing!) Have garbled phone numbers, like 12-345-6789 or 123-45?-6789 Also, create some records in which the source or destination number is recorded as null (this happens sometimes if it was an international call). Create some records in which the comma is missing between the source and destination numbers-e.g., 123-456-7890 987-654-3210. Also, create another file containing all the North American area codes (see https://www.bennetyee.org/ucsd-pages/area.html).

(a) Find the call that had the longest duration and find its source and destination regions.

(b) Find the number of garbled or incomplete CDRs.

(c) How many international calls were made?

(d) Create a list of all calls made on a particular date.

(e) Create a list of all calls made during a particular hour.

(f) Optional: Plot a distribution of the arrival times of the calls. This plot could help in identifying busy and idle periods of the network. Use exceptions (IndexError, ValueError, TypeError) to handle erroneous CDRs rather than checking individual cases using if-else constructs.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create a comma-separated file containing multiple cdrs in
Reference No:- TGS02478854

Now Priced at $15 (50% Discount)

Recommended (92%)

Rated (4.4/5)