Here is the code I have:

```
import csv
import os

for root, subFolders, files in os.walk('/path/to/folder/'):
    if 'routes.csv' in files:
        with open(os.path.join(root, "R.csv"), "r") as inf, \
                open(os.path.join(root, "B.csv"), "a") as output:
            reader = csv.DictReader(inf, quotechar='"')
            headers = ["R_id"]
            writer_B_routes = csv.DictWriter(output, headers, 
                                             extrasaction='ignore')
            writer_B_routes.writeheader()
            for row in reader:
                if int(row["R_type"]) == 3:
                    writer_B_routes.writerow(row)

```

When I run this on my CSV folders, if the value of `R_id` is only numeric, then it is outputting to `B.csv` fine (ie. `1234`). However, if the value of `R_id` is alphanumeric (ie. `A123`), then the output I am getting in `B.csv` is `""`. 

I have tried changing the `int(row["R_type"]) == 3` to `str()`, thinking there was some issue with how the Dialect was being built, but that did not work. I am unsure where this data is being passed only an integer.

**Update:** Link to sample data + script: [Here](https://drive.google.com/file/d/0Bw9ndy9Ac26zdE9JTW40R09QRHZUUmJxSkstajlRTGZpOEFn/edit?usp=sharing "Here")

**Update 2:** I've tested with a few other samples - case seems to be unique, but I can't determine why. I have another sample set of data containing a `R_id` of `005M1`, and it is functioning properly. The data giving me the issue has a `R_id` of `E2` and similar. But now I know it is not for all alphanumeric ids.