Q:

i am trying to get a value from a .csv file in python and facing this error

ValueError: invalid literal for int() with base 10: '405,000'
the code is as follows :
for d in csv.DictReader(open(c_name + '.csv'), delimiter=','):
    global d_value
    d_value = int(d['Debt Value'])

A:

405,000 isn't a valid int. You either need to remove that comma:
d_value = int(d['Debt Value'].replace(',', ''))

Or use the locale module:
import locale

# You might need to set a locale
# locale.setlocale(locale.LC_ALL, '')

d_value = locale.atoi(d['Debt Value'])

A:

It looks like you have a comma in your value, which is why you're seeing the error. You may want to sanitize your numbers by doing something like this:
    d_value = int(d['Debt Value'].replace(",", ""))

While you're at it, it's a good idea to close your files when you're done with them. You can use a with statement to make sure it will close after your block.
with open(c_name + ".csv") as csvfile:
    for d in csv.DictReader(csvfile, delimiter=','):
        global d_value
        d_value = int(d['Debt Value'].replace(",", ""))

