Hi I have a dictionary that contains data like this
dict = {'file1.txt': ['A', 'B' , 'C' , 'D' , 'E' ] , 'file2.txt': ['A', 'F' , 'C' , 'G' , 'E' ] , 'file3.txt': ['T', 'F' , 'C']}
Could some one please help me write a code that could remove the duplicate values and change the file to
dict = {'file1.txt': ['B' , 'D' ] , 'file2.txt': [ 'G' ] , 'file3.txt': [ 'T' ]}
(only the unique values...
Search Result
Collapse
8 results in 0.0041 seconds.
Keywords
Members
Tags
-
Removing duplicates from a dict
-
webDB combobox shows duplicated values - Query works fine
Good evening.
i have a table that stores dates, names (of the students) and courses (that the particular student missed, because of apscence)
i created a query, so i can recall a specific dates' aapscence. i choose the available dates form a combobox, but the only thing i dont want is the duplicate values in that combobox.
for example if, on 12/23 there where 3 students not present, the combobox will show three times 12/23....Last edited by Niheel; Dec 30 '11, 05:19 PM. -
Delete duplicate records daily based on Date
I upload names into a database everyday and sometimes I am given duplicate names or names that have previously been submitted. Basically I want to delete all but the latest record based off of the date. I have seen many post about this but I haven't really been able to get anything to work. On my table [Inbound] I have fields [NAME], [SSN], [RANK], [ULN], and [DATE]. I want to delete all duplicate records that have the same SSN excluding Null values.... -
How to compare rows in a table
I have a table that receives data from an external source.
The data is sorted by time in the format of "dd/mm/yyyy hh:nn:ss"
Some of the time cells have the same time as the follwing rows (due to rounding problems that are not connected to Access).
I want to compare each row to the next and fix the time.
I usually use querries to append data in tables but I can't manage to access a specific row using querries,... -
How to remove duplicates
Hi
I am unable to get the following code to work:
def remove_duplicat es (strng):
"""
>>> remove_duplicat es ('apple')
'aple'
>>> remove_duplicat es ('Mississippi')
'Misp'
>>> remove_duplicat es ('The quick brown fox jumps over the lazy dog')
'The quick brown fx jmps v t lazy dg'
>>> remove_duplicat es... -
Receiving duplicate values using not equal
I am trying to get alll the results of everything in the north where the towns do not match the towns contained in a seperate table, everytime I run this I am getting 37 duplications of each record in the result.
SELECT tbMainData2.ID, tbMainData2.URN , tbMainData2.Con tactName, tbMainData2.Res taurantName, tbMainData2.Add 1, tbMainData2.Add 2, tbMainData2.Add 3, tbMainData2.tow n, tbMainData2.cou nty, tbMainData2.pos tcode, tbMainData2.Tel ephone,... -
Count the no. of duplicates in an array
I need to find the no. of duplicates in this array. There is something wong in the loop, can anyone please look at it and point me towards right direction.
Thanks... -
How to check Internal and External duplicates?
Recently, I have a requirement to develop a vb.net application wherein the input excel sheet data which has an average of 5000 records should be checked for Internal duplicates (duplicates within the same sheet) and external duplicates (duplicates which exist outside this sheet). I have gone through lot of logics..some of which are ...
- Common and currently testing out..
- First insert the excel sheet data into DB..then...Last edited by tlhintoq; Aug 24 '09, 06:16 PM. Reason: [CODE] ...your code goes here... [/CODE] tags added