You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+11-19Lines changed: 11 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
#cleanco
1
+
#cleanco - 1.0
2
2
3
3
## What is it / what does it do?
4
4
This is a Python module that processes company names.
@@ -8,9 +8,6 @@ Download it from this site and unzip the directory.
8
8
9
9
* Mac: `cd` into it, and enter `sudo python setup.py install` along with your system password.
10
10
* Windows: Same thing but without `sudo`.
11
-
* Linux: ???
12
-
13
-
There may also be a way to do `pip install` but I can't guarantee this.
14
11
15
12
## How does the module work?
16
13
Let's look at some sample code. First, initialize the module:
@@ -19,37 +16,32 @@ Let's look at some sample code. First, initialize the module:
19
16
20
17
Now, come up with a company name that you want to process:
21
18
22
-
>>> companyname = "Paul Pharmaceutical, Inc."
19
+
>>> business_name = "Some Big Pharma, LLC"
23
20
24
21
Throw it into the module:
25
22
26
-
>>> processing = cleanco(companyname)
23
+
>>> processing = cleanco(business_name)
24
+
>>> x = processing.cleaner()
27
25
28
26
You can now get the company types:
29
27
30
-
>>> cotype = processing.type()
31
-
>>> print cotype
32
-
['Corporation']
28
+
>>> x.type
29
+
['Limited Liability Company']
33
30
34
31
...the possible countries...
35
32
36
-
>>> country = processing.country()
37
-
>>> print country
38
-
['Philippines', 'United States']
33
+
>>> x.country
34
+
['United States of America', 'Philippines']
39
35
40
36
...the possible industries...
41
37
42
-
>>> industry = processing.industry()
43
-
>>> print industry
38
+
>>> x.industry
44
39
['Pharmaceutical']
45
40
46
41
...and a clean version of the company name.
47
42
48
-
>>> clean = processing.cleanname()
49
-
>>> print clean
50
-
Paul Pharmaceutical
51
-
52
-
There is also a short version of the company name for times when you want to remove things in parenthesis or everything after a hyphen. You can access this with `.shortname()`.
43
+
>>> x.clean_name
44
+
'Some Big Pharma'
53
45
54
46
## Are there bugs?
55
47
You better believe it. Please let me know or fork this project. I'm sure some of the company suffixes are way incorrect and I'm missing a lot more information.
0 commit comments