import re
data = open("state_capitals.csv").read()
state_name = raw_input("Enter State Name:")
print re.findall(".*%s.*"%(state_name,),data,re.I)
probably
More Related Contents:
- Writing a Python list of lists to a csv file
- Reading a huge .csv file
- How to write to a CSV line by line?
- Python convert csv to xlsx
- How to read one single line of csv data in Python?
- Find all CSV files in a directory using Python
- Read random lines from huge CSV file
- Python: AttributeError: ‘str’ object has no attribute ‘readlines’
- How do I watch a file for changes?
- Loading and parsing a JSON file with multiple JSON objects
- How to upload file with python requests?
- Create Pandas DataFrame from a string
- Selenium give file name when downloading
- Python csv string to array
- “Line contains NULL byte” in CSV reader (Python)
- How to get rid of double backslash in python windows file path string? [duplicate]
- Reading data from a CSV file in Python
- How to efficiently handle European decimal separators using the pandas read_csv function?
- Remove very last character in file
- In Python, is there a concise way of comparing whether the contents of two text files are the same?
- Pandas – Strip white space
- Loading UTF-8 file in Python 3 using numpy.genfromtxt
- Filter string data based on its string length
- Why is pandas.to_datetime slow for non standard time format such as ‘2014/12/31’
- UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x96 in position 35: invalid start byte
- Simple CSV to XML Conversion – Python
- HTML to IMAGE using Python
- Get data from Twitter using Tweepy and store in csv file
- start index at 1 for Pandas DataFrame
- Change the file extension for files in a folder?