Home > database >  How to write!
How to write!

Time:01-16

In object-oriented programming way, please complete the following requirements,
A shopping website daily shopping user data is needed to collect, a day's shopping data, as shown in the table, please create a class, and has the following methods can be invoked:
1. Instantiate shopping data classes, the incoming shopping after the file path data table, and print the instance, described the statistical results automatically return and print in the console (hint: need to cooperate to use __init () __, __str () __, df. The describe () method),
2. Create method, return to form the basic information of the incoming instance on the console (tip: need a self-built method, need to cooperate with df. Info ()),
3. Create method, return to daily sales on the console (tip: need a self-built method, sales=visitors * * guest pay conversion unit price),
4. The creation method, the source data according to the following requirements after finishing summary to a new Excel spreadsheet:
(1) remove the "-" the source of subsidiary column;
(2) increase the "sales" columns, sales=visitors * * guest pay conversion unit price;
(3) increase the "statistical date" column, for the actual statistical date today,
Please use Pandas in the library commands to complete the operation
  • Related