SHARE
TWEET

Untitled

a guest Mar 18th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2.  
  3.  
  4. def main():
  5.     df = pd.DataFrame({'product_id': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
  6.                        'product_type': ['shirt', 'shirt', 'shirt', 'shirt', 'shirt', 'hat', 'hat', 'hat', 'hat', 'hat', 'hat', ],
  7.                        'color': [None, None, None, 'red', 'blue', None, 'blue', 'blue', 'blue', 'red', 'red', ],
  8.                        'size': [None, 's', 'xl', None, None, 's', None, 's', 'xl', None, 'xl', ],
  9.                        })
  10.     print df  
  11.  
  12. if __name__ == '__main__':
  13.     main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top