Skip to content

Instantly share code, notes, and snippets.

@LarryStanley
Created February 24, 2017 07:04
Show Gist options
  • Save LarryStanley/576c19f6d062ab5d1c07913bc2dcfb10 to your computer and use it in GitHub Desktop.
Save LarryStanley/576c19f6d062ab5d1c07913bc2dcfb10 to your computer and use it in GitHub Desktop.
客戶字串分隔
# -*- coding: utf-8 -*-
import csv
f = open('Page1-表格 1.csv', 'r')
for row in csv.DictReader(f):
original = row['客戶全稱']
new = original.split("-")
print new[0]
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment