ECSP




Pay Notebook Creator: Haige Cui0
Set Container: Numerical CPU with TINY Memory for 10 Minutes 0
Total0
In [2]:
# CrossCompute
ready_table_path = 'Ready table with geometry points.csv'
search_radius_in_miles = 5

user_address = '28-10 Jackson Ave'    # this address can be located
#user_address = '236-238 25TH STREET' # this is an address geocode can't locate
target_folder = '/tmp'
In [2]:
from geopy import GoogleV3
geocode = GoogleV3('AIzaSyDNqc0tWzXHx_wIp1w75-XTcCk4BSphB5w').geocode 
x = geocode(user_address)
if x is None:
    print("No location!")
else:
    user_coor = x.longitude, x.latitude 
In [3]:
x
Out[3]:
Location(28-10 Jackson Ave, Long Island City, NY 11101, USA, (40.7479424, -73.93824959999999, 0.0))
In [4]:
x.longitude
Out[4]:
-73.93824959999999
In [5]:
x.latitude
Out[5]:
40.7479424
In [6]:
type(user_coor)
Out[6]:
tuple
In [3]:
# Load inputs
import pandas as pd
import numpy as np
ready_table = pd.read_csv(ready_table_path)
ready_table=ready_table.drop([#'Total Tree Count within 0.5 Mile','Periodic Savings within 0.5 Mile',
                            'BIN','Latitude','Longitude',
                            'Unnamed: 0','Unnamed: 0.1','Unnamed: 0.1.1'], axis=1)
ready_table[:3]
Out[3]:
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
Company Name Industry Business Program Effective Date Address Postcode Borough Month Count Periodic Savings Total Tree Count within 0.5 Mile Periodic Savings within 0.5 Mile geometry
0 139 ACA Realty, Inc. Commercial Limousine Service ICIP 2008-04-07 43-23 35th Street 11101 QUEENS 116 1068.75 683 1423.931818 POINT (-73.929565 40.745706)
1 141 Lake Avenue Realty c/o JR Produce, Inc. Wholesale/Warehouse/Distribution Dist. of prepacked salads ICIP 2009-12-08 141 Lake Avenue 10303 STATEN IS 96 494.93 21 336.525000 POINT (-74.150999 40.633153)
2 14-10 123rd Street LLC Commercial Electrical Parts Mfg. ICIP 2011-03-04 14-10 123rd Street 11356 QUEENS 81 263.25 447 1079.380000 POINT (-73.84483299999999 40.785144)
In [8]:
addresses = ready_table['Address'].tolist()
addresses[:3]
Out[8]:
['43-23 35th Street', '141 Lake Avenue', '14-10 123rd Street']
In [9]:
import subprocess
subprocess.call('pip install geopandas'.split())
Out[9]:
0
In [ ]:
import pandas as pd
import requests
import logging
import time

logger = logging.getLogger('root')
logger.setLevel(logging.DEBUG)
# create console handler
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
logger.addHandler(ch)

#------------------ CONFIGURATION -------------------------------

# Set your Google API key here. 
# Even if using the free 2500 queries a day, its worth getting an API key since the rate limit is 50 / second.
# With API_KEY = None, you will run into a 2 second delay every 10 requests or so.
# With a 'Google Maps Geocoding API' key from https://console.developers.google.com/apis/, 
# the daily limit will be 2500, but at a much faster rate.

API_KEY = 'AIzaSyDNqc0tWzXHx_wIp1w75-XTcCk4BSphB5w'
# Backoff time sets how many minutes to wait between google pings when your API limit is hit
BACKOFF_TIME = 30
# Set your output file name here.
output_filename = 'Ready table with convertable addresses.csv'
# Set your input file here
input_filename = 'Ready table with geometry points.csv'
# Specify the column name in your input data that contains addresses here
address_column_name = 'Address'
# Return Full Google Results? If True, full JSON results from Google are included in output
RETURN_FULL_RESULTS = False

#------------------ DATA LOADING --------------------------------

# Read the data to a Pandas Dataframe
data = pd.read_csv(input_filename, encoding='utf8')

if address_column_name not in data.columns:
    raise ValueError('Missing Address column in input data')

addresses = data['Address'].tolist()

#------------------	FUNCTION DEFINITIONS ------------------------

def get_google_results(address, api_key='AIzaSyDNqc0tWzXHx_wIp1w75-XTcCk4BSphB5w', return_full_response=False):

    # Set up your Geocoding url
    geocode_url = 'https://maps.googleapis.com/maps/api/geocode/json?address={}'.format(address)
    if api_key is not None:
        geocode_url = geocode_url + '&key={}'.format(api_key)
        
    # Ping google for the reuslts:
    results = requests.get(geocode_url)
    # Results will be in JSON format - convert to dict using requests functionality
    results = results.json()
    
    # if there's no results or an error, return empty results.
    if len(results['results']) == 0:
        output = {
            'formatted_address' : None,
            'latitude': None,
            'longitude': None,
        }
    else:    
        answer = results['results'][0]
        output = {
            'formatted_address' : answer.get('formatted_address'),
            'latitude': answer.get('geometry').get('location').get('lat'),
            'longitude': answer.get('geometry').get('location').get('lng'),
}
        
    # Append some other details:    
    output['input_string'] = address
    #output['number_of_results'] = len(results['results'])
    output['status'] = results.get('status')
    if return_full_response is True:
        output['response'] = results
    
    return output

#------------------ PROCESSING LOOP -----------------------------

# Create a list to hold results
results = []
# Go through each address in turn
for address in addresses:
    # While the address geocoding is not finished:
    geocoded = False
    while geocoded is not True:
        # Geocode the address with google
        try:
            geocode_result = get_google_results(address, API_KEY, return_full_response=RETURN_FULL_RESULTS)
        except Exception as e:
            logger.exception(e)
            logger.error('Major error with {}'.format(address))
            logger.error('Skipping!')
            geocoded = True
            
        # If we're over the API limit, backoff for a while and try again later.
        if geocode_result['status'] == 'OVER_QUERY_LIMIT':
            logger.info('Hit Query Limit! Backing off for a bit.')
            time.sleep(BACKOFF_TIME * 60) # sleep for 30 minutes
            geocoded = False
        else:
            # If we're ok with API use, save the results
            # Note that the results might be empty / non-ok - log this
            if geocode_result['status'] != 'OK':
                logger.warning('Error geocoding {}: {}'.format(address, geocode_result['status']))
            logger.debug('Geocoded: {}: {}'.format(address, geocode_result['status']))
            results.append(geocode_result)           
            geocoded = True

    # Print status every 100 addresses
    if len(results) % 100 == 0:
        logger.info('Completed {} of {} address'.format(len(results), len(addresses)))
            
    # Every 500 addresses, save progress to file(in case of a failure so you have something!)
    if len(results) % 500 == 0:
        pd.DataFrame(results).to_csv('{}_bak'.format(output_filename))

# All done
logger.info('Finished geocoding all addresses')
# Write the full results to csv using the pandas library.
pd.DataFrame(results).to_csv(output_filename, encoding='utf8')
In [5]:
geocoded_table = pd.read_csv('Ready table with convertable addresses.csv')
#geocoded_table=pd.DataFrame(results)
geocoded_table = geocoded_table.rename(columns={'input_string': 'Address',
                                               'input_string': 'Address'}) 
len(geocoded_table)
Out[5]:
502
In [6]:
cannot_converted_table=geocoded_table[geocoded_table['status'] != 'OK'][['Address','formatted_address']]
cannot_converted_table
Out[6]:
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
Address formatted_address
27 236-238 25TH STREET NaN
34 140 58TH STREET BLDG. B #7A NaN
54 3611 14th Ave, Rm #405 NaN
71 140 58th Street, Bldg B #8D NaN
87 75-77 19th St, 1A First Floor NaN
98 139-10 15TH AVENUE AKA 15-30 NaN
160 89 19th St., 2nd Fl. space 1 NaN
187 1155 Manhattan Avenue #1011 NaN
201 190-220 Third Street NaN
334 34-20 12th St. NaN
456 119 8th Street, #201 NaN
474 140 58th Street, Bldg B, #8F NaN
In [7]:
ready_table.head()
Out[7]:
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
Company Name Industry Business Program Effective Date Address Postcode Borough Month Count Periodic Savings Total Tree Count within 0.5 Mile Periodic Savings within 0.5 Mile geometry
0 139 ACA Realty, Inc. Commercial Limousine Service ICIP 2008-04-07 43-23 35th Street 11101 QUEENS 116 1068.75 683 1423.931818 POINT (-73.929565 40.745706)
1 141 Lake Avenue Realty c/o JR Produce, Inc. Wholesale/Warehouse/Distribution Dist. of prepacked salads ICIP 2009-12-08 141 Lake Avenue 10303 STATEN IS 96 494.93 21 336.525000 POINT (-74.150999 40.633153)
2 14-10 123rd Street LLC Commercial Electrical Parts Mfg. ICIP 2011-03-04 14-10 123rd Street 11356 QUEENS 81 263.25 447 1079.380000 POINT (-73.84483299999999 40.785144)
3 183 Lorriane Street LLC Wholesale/Warehouse/Distribution Commercial Storage facility ICIP 2015-11-06 183 Lorraine Street 11231 BROOKLYN 25 4200.66 224 2846.165714 POINT (-74.00230000000001 40.673106)
4 21st Century Optics, Inc. Manufacturing Eye glasses Tenant 2009-01-07 47-00 33rd Street 11101 QUEENS 107 2016.42 658 1524.019111 POINT (-73.932148 40.742386)
In [11]:
merged_table = pd.merge(ready_table,
                 geocoded_table[['Address','formatted_address','status']],
                 on='Address', how='right')
df2 = merged_table[merged_table.status == 'OK']
df2 = df2.drop(df2[(df2.status != 'OK')].index)
df2 = df2.drop_duplicates()
df2
Out[11]:
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
Company Name Industry Business Program Effective Date Address Postcode Borough Month Count Periodic Savings Total Tree Count within 0.5 Mile Periodic Savings within 0.5 Mile geometry formatted_address status
0 139 ACA Realty, Inc. Commercial Limousine Service ICIP 2008-04-07 43-23 35th Street 11101 QUEENS 116 1068.75 683 1423.931818 POINT (-73.929565 40.745706) 43-23 35th St, Long Island City, NY 11101, USA OK
1 141 Lake Avenue Realty c/o JR Produce, Inc. Wholesale/Warehouse/Distribution Dist. of prepacked salads ICIP 2009-12-08 141 Lake Avenue 10303 STATEN IS 96 494.93 21 336.525000 POINT (-74.150999 40.633153) 141 Lake Ave, Elyria, OH 44035, USA OK
2 14-10 123rd Street LLC Commercial Electrical Parts Mfg. ICIP 2011-03-04 14-10 123rd Street 11356 QUEENS 81 263.25 447 1079.380000 POINT (-73.84483299999999 40.785144) 14-10 123rd St, Flushing, NY 11356, USA OK
3 183 Lorriane Street LLC Wholesale/Warehouse/Distribution Commercial Storage facility ICIP 2015-11-06 183 Lorraine Street 11231 BROOKLYN 25 4200.66 224 2846.165714 POINT (-74.00230000000001 40.673106) 183 Lorraine St, Brooklyn, NY 11231, USA OK
4 21st Century Optics, Inc. Manufacturing Eye glasses Tenant 2009-01-07 47-00 33rd Street 11101 QUEENS 107 2016.42 658 1524.019111 POINT (-73.932148 40.742386) 4700 33rd St, Long Island City, NY 11101, USA OK
5 BIMMY''''S LLC Manufacturing MANUFACTURER Relocator 2006-12-06 47-00 33rd Street 11101 QUEENS 132 1191.88 658 1524.019111 POINT (-73.932148 40.742386) 4700 33rd St, Long Island City, NY 11101, USA OK
6 BIMMY''''S LLC Manufacturing MANUFACTURER Tenant 2017-03-09 47-00 33rd Street 11101 QUEENS 9 1446.38 658 1524.019111 POINT (-73.932148 40.742386) 4700 33rd St, Long Island City, NY 11101, USA OK
7 Burden, LLC Manufacturing Manufacture and refurbisher of furniture Relocator 2016-12-07 47-00 33rd Street 11101 QUEENS 12 47.16 658 1524.019111 POINT (-73.932148 40.742386) 4700 33rd St, Long Island City, NY 11101, USA OK
20 221 WEST 26TH STREET CORP. Manufacturing FILM & VIDEO PRODUCTION ICIP 2004-12-14 221 WEST 26TH STREET 10001 MANHATTAN 156 6184.09 55 3534.110000 POINT (-73.995088 40.746364) 221 W 26th St, New York, NY 10001, USA OK
21 2840 Atlantic Avenue Realty Corp Commercial Real estate holding company ICIP 2008-06-16 2840 Atlantic Avenue 11207 BROOKLYN 114 927.22 591 859.733333 POINT (-73.889346 40.676789) 2840 Atlantic Ave, Brooklyn, NY 11207, USA OK
22 33RD STREET BAKERY INC. DBA PQ SOHO Manufacturing WHSLR. BREADS & PASTRY ICIP 2009-04-08 43-32 33RD STREET 11101 QUEENS 104 137.24 559 1520.443778 POINT (-73.931466 40.745811) 43-32 33rd St, Long Island City, NY 11101, USA OK
23 4C FOODS CORP. Manufacturing Iced tea mic, brad crumbs, grated cheese, dehy... ICIP 2005-03-19 580 Fountain Ave. 11208 BROOKLYN 153 7055.95 84 10377.226667 POINT (-73.87113199999997 40.665766) 580 Fountain Ave, Brooklyn, NY 11208, USA OK
24 4Over4.com Manufacturing Printer IDA 2008-04-09 19-41 46th Street 11105 QUEENS 116 1459.78 421 2140.975000 POINT (-73.896804 40.77494) 19-41 46th St, Long Island City, NY 11105, USA OK
25 538-540 West 35 Corp Manufacturing steel, wood & cement tanks ICAP 2010-06-07 11-42 46th Road 11101 QUEENS 90 501.64 237 2522.012424 POINT (-73.94949699999999 40.74551) 11-42 46th Rd, Long Island City, NY 11101, USA OK
26 A & L Scientific Corp. Manufacturing fabricates and services biotech medical equipment IDA 2011-09-19 88-05 76th Avenue 11385 QUEENS 75 348.23 156 1036.755000 POINT (-73.862139 40.707402) 88-05 76th Ave, Flushing, NY 11385, USA OK
27 A TO Z BOHEMIAN GLASS, INC. Manufacturing IMP AND DIST. FASH. BEADS IDA 2005-10-05 12 REWE STREET 11211 BROOKLYN 146 529.89 341 1201.360909 POINT (-73.932208 40.716031) 12 Rewe St, Brooklyn, NY 11211, USA OK
28 A TO Z KOSHER MEAT PRODUCT CO. Manufacturing MFG. MEAT PRODUCTS ICIP 2004-07-02 123 GRAND STREET 11211 BROOKLYN 161 1087.05 200 1087.050000 POINT (-73.963076 40.715227) 123 Grand St, New York, NY 10013, USA OK
29 A.K.S. International, Inc Manufacturing metal contracting & fabricator of metal products IDA 2015-07-06 37-04 19th Avenue 11105 QUEENS 29 438.37 240 2140.975000 POINT (-73.900755 40.779184) 37-4 19th Ave, Astoria, NY 11105, USA OK
30 ABIGAL PRESS, INC. Manufacturing PRINTER AND ENGRAVER ICIP 2008-06-30 97-35 133rd Ave 11417 QUEENS 114 1339.47 40 1339.470000 POINT (-73.839512 40.676351) 97-35 133rd Ave, Jamaica, NY 11417, USA OK
31 ARROW LINEN SUPPLY CO. Commercial IND. COMM. LAUNDRY SRVC. IDA 2012-05-11 467 PROSPECT AVENUE 11215 BROOKLYN 67 8691.62 1154 8691.620000 POINT (-73.982725 40.65943) 467 Prospect Ave, Brooklyn, NY 11215, USA OK
32 Achieve Beyond, Inc. (Formerly Bilinguals, Inc.) Commercial Back Office Space Relocator 2012-12-24 70-00 Austin Street 11375 QUEENS 60 1452.19 1262 1452.190000 POINT (-73.846811 40.720892) 70-00 Austin St, Forest Hills, NY 11375, USA OK
33 ACME METAL CAP CO., INC./PETROFORM Manufacturing MFG. METAL & CORK ENCLOSU IDA 2008-06-06 62-01 34TH AVENUE 11377 QUEENS 114 1676.76 818 958.437500 POINT (-73.89980300000001 40.752183) 33-01 62nd St, Woodside, NY 11377, USA OK
34 ACME SMOKED FISH CORP. Manufacturing MFG. OF SMOKED FISH ICIP 2000-11-01 30 GEM STREET 11222 BROOKLYN 205 9731.65 330 2708.436000 POINT (-73.95654 40.72499000000001) 30 Gem St, Brooklyn, NY 11222, USA OK
35 Action Carting Environmental Services, Inc Manufacturing Manufacturer and wholesaler of a material reco... ICAP 2010-10-01 1221 East Bay Ave. 10474 BRONX 86 2341.37 54 1414.856154 POINT (-73.888513 40.80819) 1221 E Bay Ave, Bronx, NY 10474, USA OK
36 Aesthetonics, Inc. Manufacturing NaN Relocator 2009-03-12 21-29 Belvidere Street 11206 BROOKLYN 105 1052.95 281 2770.691667 POINT (-73.936863 40.698747) 21 Belvidere St, Brooklyn, NY 11206, USA OK
37 AFC INDUSTRIES, INC. Manufacturing MFG. COMPUTER FURNI. IDA 2004-03-05 13-16 133RD PLACE 11356 QUEENS 165 153.62 139 824.530000 POINT (-73.83452700000002 40.786469) 13-16 133rd Pl, Flushing, NY 11356, USA OK
38 African Services Committee, Inc. Commercial Provider of Social Services Tenant 2011-12-09 423-429 W 127th Street 10027 MANHATTAN 72 174.28 583 357.933571 POINT (-73.95375899999998 40.812964) 423 W 127th St, New York, NY 10027, USA OK
39 Aids Vaccine Advocacy Coalition Commercial Provides information, education and advocacy f... ICIP 2011-11-07 423-429 W 127th Street 10027 MANHATTAN 73 144.57 583 357.933571 POINT (-73.95375899999998 40.812964) 423 W 127th St, New York, NY 10027, USA OK
40 Neighborhood Eigth Avenue LLC Commercial NaN ICIP 2011-06-09 423-429 W 127th Street 10103 MANHATTAN 78 321.42 583 357.933571 POINT (-73.95375899999998 40.812964) 423 W 127th St, New York, NY 10027, USA OK
41 The Gluck Architectural Collaborative, P.C. Commercial Architectural serices, consturction management Tenant 2011-09-08 423-429 W 127th Street 10027 MANHATTAN 75 310.46 583 357.933571 POINT (-73.95375899999998 40.812964) 423 W 127th St, New York, NY 10027, USA OK
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
595 United Air Conditioning Corp Manufacturing Fabrication of HVAC Syetems IDA 2010-10-05 27-02 Skillman Avenue 11101 QUEENS 86 1268.19 318 3449.634340 POINT (-73.94014 40.744454) 27-02 Skillman Ave, Long Island City, NY 11101... OK
596 UNITED FEDERATION OF TEACHERS Commercial COLLECTIVE BARG. ICIP 2004-07-01 2500 HALSEY STREET 10461 BRONX 162 1727.69 713 1578.658750 POINT (-73.842448 40.837532) 2500 Halsey St, Bronx, NY 10461, USA OK
597 UNITED FEDERATION OF TEACHERS Commercial COLLECTIVE BARG. Tenant 2004-11-22 2500 HALSEY STREET 10461 BRONX 157 736.64 713 1578.658750 POINT (-73.842448 40.837532) 2500 Halsey St, Bronx, NY 10461, USA OK
600 United Nations Federal Credit Union Other Landlord ICIP 2007-11-02 24-01 44 Rd. 11101 QUEENS 121 7300.32 450 4215.842439 POINT (-73.943731 40.748206) 24-01 44th Rd, Long Island City, NY 11101, USA OK
601 Uniworld Group Inc. Other Professional Scientifc Svcs. Tenant 2009-12-04 1 Metrotech Center N. 11th Fl. 11201 BROOKLYN 96 993.45 170 1643.614286 POINT (-73.987227 40.693463) 1 MetroTech Center 11th Fl, Brooklyn, NY 11201... OK
603 UTILITY BRASS & BRONZE Manufacturing MFG. GRILL WORK AIR COND. ICIP 2005-05-09 42 2ND AVENUE 11215 BROOKLYN 151 2287.26 558 3052.645714 POINT (-73.99225300000001 40.673968) 42 2nd Ave, North Tonawanda, NY 14120, USA OK
604 Valon Realty, LLC Commercial NaN ICIP 2010-10-14 260 51st Street 11220 BROOKLYN 86 71.47 296 1604.076923 POINT (-74.016249 40.64776) 260 51st St, Brooklyn, NY 11220, USA OK
605 VAL''''S OCEAN PACIFIC SEAFOOD Manufacturing DISTRIBUTION SEAFOOD ICIP 2005-10-04 620-624 WORTHEN STREET 10474 BRONX 146 324.56 75 1395.616667 POINT (-73.891527 40.811574) 620 Worthen St, Lowell, MA 01852, USA OK
606 VISITING NURSE SERVICE OF NEW YORK Commercial BACK OFFICE Tenant 2008-01-29 1200 WATERS PLACE 10461 BRONX 119 3647.13 861 1587.172500 POINT (-73.838373 40.842733) 1200 Waters Place, 1200 Waters Pl, Bronx, NY 1... OK
607 VISY PAPER RECYCLING Manufacturing PAPER RECYCLER ICIP 2008-07-01 4435 VICTORY BOULEVARD 10314 STATEN IS 114 274038.51 41 274038.510000 POINT (-74.20082499999999 40.586217) 4435 Victory Blvd, Staten Island, NY 10314, USA OK
608 VIVA TIME CORP. Wholesale/Warehouse/Distribution IMPORT/EXPORT OF WATCHES Tenant 2014-12-04 140 58TH STREET BLDG B UNIT 7F 11220 BROOKLYN 36 545.85 137 1678.633000 POINT (-74.022864 40.645338) 140 58th St BLDG B UNIT 7F, Brooklyn, NY 11220... OK
609 W Architecture & Landscape Architecture LLC Commercial Architecture & landscape architecture Relocator 2015-12-08 372-374 Fulton St, 3rd & 4th Fl 11201 BROOKLYN 24 65.70 407 1643.614286 POINT (-73.987714 40.69159699999999) 372 Fulton St #3rd, Brooklyn, NY 11201, USA OK
610 WALL STREET MAIL PICK-UP SERVICE Other SERVICES ICIP 2006-06-08 36-20 38TH STREET 11101 QUEENS 138 190.84 625 608.676154 POINT (-73.92459699999998 40.753432) 36-20 38th St, Long Island City, NY 11101, USA OK
611 Walsh Electrical Contracting Inc. Commercial installer of electrical parts IDA 2015-07-01 15 Newark Avenue 10306 STATEN IS 30 272.20 2 601.625000 POINT (-74.14348000000003 40.638163) 15 Newark Ave, Belleville, NJ 07109, USA OK
612 WATER LILIES FOOD, INC. Manufacturing MANUFACTURER ICIP 2007-07-02 45-10 19TH AVENUE 11105 QUEENS 125 7009.46 268 2140.975000 POINT (-73.896413 40.776128) 45-10 19th Ave, Long Island City, NY 11105, USA OK
613 WATERBURY SEABURY LLC Commercial Landlord and Property Management company ICIP 2008-08-08 2500 WATERBURY AVENUE 10462 BRONX 112 170.41 653 1457.485000 POINT (-73.840986 40.835524) 2500 Waterbury Ave, Bronx, NY 10462, USA OK
614 WATERMARK DESIGN, LTD. Manufacturing Decorative Faucets IDA 2008-04-21 350 DEWITT AVENUE 11207 BROOKLYN 116 1935.54 88 1281.105000 POINT (-73.89707800000002 40.656048) 350 Dewitt Ave, Brooklyn, NY 11207, USA OK
615 WAY FONG LLC Manufacturing MFG. VARIOUS ASIAN FOODS IDA 2006-03-18 57-29 49TH STREET 11378 QUEENS 141 3364.77 10 3983.409091 POINT (-73.920396 40.7233) 57-29 49th St, Maspeth, NY 11378, USA OK
616 Weapons Specialist Ltd Wholesale/Warehouse/Distribution NaN IDA 2015-02-18 47-40 Metropolitan Ave 11385 QUEENS 34 2174.81 670 3012.901667 POINT (-73.91899000000002 40.713695) 47-40 Metropolitan Ave, Flushing, NY 11385, USA OK
617 WHBI LLC Commercial Biomedical research facility ICIP 2014-11-06 423-427 West 127th Street 10027 MANHATTAN 37 246.11 583 357.933571 POINT (-73.95375899999998 40.812964) 423 W 127th St, New York, NY 10027, USA OK
618 Whipped Pastry Boutique, Inc. Manufacturing Commercial Bakery ICAP 2014-07-10 37 Richards Street 11231 BROOKLYN 41 232.43 395 1522.026667 POINT (-74.00668399999998 40.680349) 37 Richards St, Worcester, MA 01603, USA OK
619 White Coffee Corporation Manufacturing Mfg specialty coffee/import & distribute coffe... ICIP 2011-01-10 18-35 38th Street 11105 QUEENS 83 2847.53 168 2140.975000 POINT (-73.898971 40.779751) 18-35 38th St, Long Island City, NY 11101, USA OK
620 WIGGBY PRECISION MACHINE CORP. Manufacturing MANUFACTURING City/State 2015-05-15 140 58th Street Bldg. A Unit 8 11220 BROOKLYN 31 1289.55 137 1678.633000 POINT (-74.022864 40.645338) 140 58th St Bldg. A Unit 8, Brooklyn, NY 11220... OK
621 WILDA IMPORT EXPORT CORPORATION Wholesale/Warehouse/Distribution IMPORT/EXPORT CLOTHING Relocator 2005-04-07 38-14 30TH STREET 11101 QUEENS 152 195.55 534 3497.464815 POINT (-73.93302800000002 40.753928) 38-14 30th St, Long Island City, NY 11101, USA OK
622 William Hird & Co., Inc. Manufacturing Manufacture fire protection systems ICIP 2008-07-11 255 40th Street 11232 BROOKLYN 113 293.73 410 1240.848000 POINT (-74.009925 40.653997) 255 40th St, Pittsburgh, PA 15201, USA OK
623 WILLIAMS SEAFOOD, INC. Wholesale/Warehouse/Distribution DISTRIBUTOR Tenant 2006-08-31 800 FOOD CENTER DRIVE, UNIT 65B 10474 BRONX 136 178.89 28 1504.531481 POINT (-73.876414 40.805255) 800 Food Center Dr #65B, Bronx, NY 10474, USA OK
624 WOLF-GORDON CO., INC. Manufacturing WHOLESALE (FABRICS) Tenant 2008-11-03 47-00 33RD STREET 11101 QUEENS 109 1355.71 658 1524.019111 POINT (-73.932148 40.742386) 4700 33rd St, Long Island City, NY 11101, USA OK
625 WONTON FOOD, INC. Manufacturing MFG. PASTA, EGGROLL SKINS ICIP 2004-07-06 220-222 MOORE STREET 11206 BROOKLYN 161 12336.36 249 3308.218182 POINT (-73.93601 40.704425) 220 Moore St #222, Brooklyn, NY 11206, USA OK
626 WORKSMAN TRADING CORP. Manufacturing MFG. INDUSTRIAL BIKES ICIP 2008-03-28 94-15 100TH STREET 11416 QUEENS 117 710.82 116 710.820000 POINT (-73.843777 40.688681) 94-15 100th St, Jamaica, NY 11416, USA OK
627 ZECRON TEXTILE, INC. Wholesale/Warehouse/Distribution Importer of linens ICIP 2009-06-09 151 LAKE AVENUE 10303 STATEN IS 102 178.12 22 336.525000 POINT (-74.151034 40.632925) 151 Lake Ave, Fair Haven, NJ 07704, USA OK
<p>490 rows × 15 columns</p>
In [12]:
# Save your output files in target_folder
target_folder = '/tmp'
target_path = target_folder + '/Ready Table with 490 rows.csv'
df2.to_csv(target_path, index=False)

# Render the file as a table
print('final_table_path = %s' % target_path)
final_table_path = /tmp/Ready Table with 490 rows.csv
In [13]:
df2.to_csv('Ready Table with 490 rows.csv', sep=',')
In [ ]: