Coder Social home page Coder Social logo

command-design-pattern-practice's Introduction

Argparse Command Design Practice

Usage:

  • Download all files in one directory
  • Open a terminal and cd into this directory
  • Install required packages by typing pip3 install -r requirements.txt
  • Type command python transform_csv.py --input_csv_path <absolute path to csv file> --type <some string> --output_csv_path <absolute path to output file>
  • You will find the transformed file in this directory after the command is run

Assumptions:

  • Types include posts, or other schemas that are known to the data team.

  • The transformation scripts are designed based on these schemas.

  • The helper functions can be matched to the --type provided by the user. In this case, helper.py only transforms columns in posts.py, in the future, if a user types in 'blogs,py', the script will import 'hepler_blogs.py' for the corresponding functions.

  • When truncating message columns, I deleted all puncutations first. The reason is that, most of the time, the punctuations don't contain meaningful signals for the end users -- data anaylsts or data scientists. However, this needs to be confirmed with the end users first before writing any scripts to transform the column.

command-design-pattern-practice's People

Contributors

whiskersreneewe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.