I found that Head First Python gives a really good introduction to Django. It's
definitely a beginners book, as are all of the Head First books, but it still
teaches the basics in a very good manner.
If you're very knowledgeable with Python, you can skip the first few chapters
(or read through
similar_headers = 0
different_headers = 0
source_headers = sorted(source_mapping.headers)
target_headers = sorted(target_mapping.headers)
# Check if the headers between the two mappings are the same
if set(source_headers) == set(target_headers):
similar_headers = len(source_headers)
else:
Hi all.
I'm writing a Python script that will be used to compare two database
tables. Currently, those two tables are dumped into .csv files,
whereby my code goes through both files and makes comparisons. Thus
far, I only have functionality coded to make comparisons on the
headers to check for sim
On Jun 13, 11:09 am, Chris Angelico wrote:
> On Tue, Jun 14, 2011 at 12:58 AM, Zachary Dziura wrote:
> > if set(source_headers) == set(target_headers):
> > similar_headers = len(source_headers)
>
> Since you're making sets already, I'd recommend using set ope
For this script, it's guaranteed that whatever tables the script goes
through and processes, there will be no duplicate headers. I didn't
include functionality to deal with duplicates because there won't be
any to begin with! I just wanted to find out the most efficient way of
checking for similar
I have a dict that I would like to print out in a series of columns,
rather than as a bunch of lines. Normally when you do print(dict), the
output will look something like this:
{'Header2': ['2', '5', '8'], 'Header3': ['3', '6', '9'], 'Header1':
['1', '4', '7'], 'Header4': ['10', '11', '12']}
I c
> On Jun 13, 11:55 pm, zainul franciscus wrote:
> I started an open source file organizer called Miranda. Miranda is
> inspired by Belvedere written by Adam Pash of Lifehacker (http://
> lifehacker.com/341950/belvedere-automates-your-self+cleaning-pc). I
> know you guys must be thinking "Hmm, Mir
On Thursday, June 16, 2011 9:02:45 AM UTC-4, Andrew Berg wrote:
> On 2011.06.15 08:57 AM, Zach Dziura wrote:
> > Just repeat this to yourself: Python ISN'T Java.
> class MainClass:
> def public static void main(*args):
> print('Am I doin' it right?')
>
> :P
>
> Or something like that.