473,378 Members | 1,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

looking for data on csv files

Hi!
I am using the csv modules..

when I use the command:

if nome in row[rowcsv]:
print "\n"
print row[rowcsv] + "\n ---- " + row[11] + "\n"
print
"################################################# ###############"

there is this case:

1- data on file PUItarr

If the user try to find for puitarr or PUITARR it doesn´t find.

I tried the string.upper and .lower , but there is a a way to look far
all possible combinations?

And yes, i am a newbie..

Aug 28 '06 #1
2 1302
import re
if re.search(nome, row[rowcsv], re.I):
...

that's re.I [capital i] as in ignorecase.

flit wrote:
Hi!
I am using the csv modules..

when I use the command:

if nome in row[rowcsv]:
print "\n"
print row[rowcsv] + "\n ---- " + row[11] + "\n"
print
"################################################# ###############"

there is this case:

1- data on file PUItarr

If the user try to find for puitarr or PUITARR it doesn´t find.

I tried the string.upper and .lower , but there is a a way to look far
all possible combinations?

And yes, i am a newbie..
Aug 28 '06 #2
flit a écrit :
Hi!
I am using the csv modules..

when I use the command:

if nome in row[rowcsv]:
print "\n"
print row[rowcsv] + "\n ---- " + row[11] + "\n"
print
"################################################# ###############"
Python 2.4.1 (#1, Jul 23 2005, 00:37:37)
[GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on
linux2
Type "help", "copyright", "credits" or "license" for more information.
>>if nome in row[rowcsv]:
.... print "\n"
.... print row[rowcsv] + "\n ---- " + row[11] + "\n"
.... print
....
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'nome' is not defined

Not enough code to reproduce your problem. Please post the minimal
snippet reproducing your problem.
there is this case:

1- data on file PUItarr

If the user try to find for puitarr or PUITARR it doesn´t find.

I tried the string.upper and .lower , but there is a a way to look far
all possible combinations?
Probably.
And yes, i am a newbie..
Don't worry - we've all been newbies.
Aug 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
Hello, I'm looking to create a PHP script that will automatically generate an index/menu/list (whatever) based on the PDF files that are within a particular directory. I would like the script...
4
by: Alexander DEJANOVSKI | last post by:
Hi all, I'm starting a new project to develop an Open-Source EAI server in Python and I'm looking for motivated developpers and testers. It is inspired by Open Adaptor (www.openadaptor.org), but...
1
by: Jonathan Wilson | last post by:
I am looking for a C++ class library that can store data in a tree. The class library needs to be: 1.Available under a licence like GPL, LGPL or BSD so I can use it in my GPL program and 2.Usable...
12
by: M.Siler | last post by:
I didn't know what group to post this in... I'm looking for a good hex editor. One that would permit me to view two files at the same time and as I move the position in one it would also move it in...
6
by: P Jones | last post by:
Hi, I support an enterprise web application (IE client) built in VB6, with about 200 classes, serving about 7000 users, running on 3 clustered servers. I need to incorporate web reporting for...
3
by: Jack Klein | last post by:
I'm looking for opinions on a C technique I, and others, have used successfully in the past. While some people swear by, apparently others swear at it. Assume a part of a program too large to...
2
by: Rosa | last post by:
Hi, I'm looking for an elegant solution on how to find the youngest file within a given directory. At the moment I'm storing all files in an array and loop through it comparing the creation date...
0
by: AMDRIT | last post by:
I am looking for better concrete examples, as I am a bit dense, on design patterns that facilitate my goals. I have been out to the code project, planet source code, and microsoft's patterns and...
2
by: Stephen Plotnick | last post by:
I'm looking for the best way to do a new project. I'm fairly good at VB 2005. I'm really good at Excel, including 2007. I've never done macros in Excel but if that is the option needed I would...
9
by: brad | last post by:
Just wondering if anyone has ever solved this efficiently... not looking for specific solutions tho... just ideas. I have one thousand words and one thousand files. I need to read the files to...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.