Sponsored Content
Top Forums Programming Appending a column in xlsx file using Python Post 303000014 by nans on Monday 3rd of July 2017 03:59:47 AM
Old 07-03-2017
Code:
                while cpos:
                    if (dict_pos.has_key(cpos)):
                        NG = dict_pos[cpos]
                        print dict_pos[cpos]
                    else:
                        NG = 'Unknown_' + datetime.now().strftime("%B") + datetime.now().strftime("%Y")
                    row_no += 1
                    print row_no
                    cpos = Scores(POS=cell_pos.value, ALT=cell_alt.value, REF=cell_ref.value)
                    #print cpos
                wb.save(sheet_xl_file)

Im not able to print the row no either as
Code:
 print dict_pos[cpos]

goes into a loop. I dont know how to proceed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending a column in one file to the corresponding line in a second

It appears that this has been asked and answered in similar fashions previously, but I am still unsure how to approach this. I have two files containing user information: fileA ttim:/home/ttim:Tiny Tim:632 ppinto:/home/ppinto:Pam Pinto:633 fileB ttim:xkfgjkd*&#^jhdfh... (3 Replies)
Discussion started by: suzannef
3 Replies

2. Shell Programming and Scripting

Appending 'string' to file as first column.

Hi , I have the below file with 6 columns.I want to append 'File1' as the 1 column to the file. i have the sample code .It is not working . can u please correct this or make new one ..... awk 'print {'File1',$1,$2,$3,$4,$5,$6}' Source_File> Result_File Source_File:... (6 Replies)
Discussion started by: satyam_sat
6 Replies

3. Shell Programming and Scripting

appending column file

Hi all, I have two files with the same number of lines the first file is a.dat and looks like 0.000 1.000 1.000 2.000 ... the fields are tab separated the second file is b.dat and looks like 1.2347 0.546 2.3564 0.321 ... the fields are tab separated I would like to have a file c.dat... (4 Replies)
Discussion started by: f_o_555
4 Replies

4. UNIX for Dummies Questions & Answers

Appending date value mmdd to first column in file

Hi , I have a file with a running sequence number. I need to append a date value mmdd format on to the first column. for e.g.: The file contains records as 001 abc 002 cde 003 edf 004 fgh 005 hik The output should be 1111001 abc 1111002 cde 1111003 edf 1111004 ... (1 Reply)
Discussion started by: kalyansid
1 Replies

5. Shell Programming and Scripting

Appending new column to existing files

Hi, i want to add another column to existing files containing strings and need to have the final output as a csv file. i have quite a number of files, each with varying number of rows and i need to append the string "test" for all the valid rows for each file. my sample raw files looks like this... (8 Replies)
Discussion started by: ida1215
8 Replies

6. UNIX for Dummies Questions & Answers

Appending a column of numbers in ascending order to a text file

I have a text file where I want to append a column of numbers in ascending orders. Input: 57 abc 25 def 32 ghi 54 jkl Output:57 abc 57 abc 1 25 def 2 32 ghi 3 54 jkl 4 How do I go about doing that? Thanks! (11 Replies)
Discussion started by: evelibertine
11 Replies

7. Shell Programming and Scripting

Appending column to rows

Hi All, Input.txt KGO Id "003" .......... .......... Par "CPara" BIN RECGET Name "DIR_PATH" Prompt "DIR_PATH" END RECGET KGO ............ .......... ............... KGO Id "077" .......... .......... (7 Replies)
Discussion started by: unme
7 Replies

8. Shell Programming and Scripting

Appending = in particular column in csv file

Hi, I have a requirement to append = in particular row in csv file. Data in csv is as follow: row1,a,a,a row2,b,b,b row3,c,c,c row4,d,d,d csv should be modified at row3 and no. of columns are not fixed but rows are. output should be as: row1,a,a,a row2,b,b,b row3,=c,=c,=c... (2 Replies)
Discussion started by: Divya1987
2 Replies

9. Shell Programming and Scripting

Python soap and string to .xlsx conversion

Hi experts - I'm relatively new to python, but I have an requirement to automate getting a file from a WebLib server using an API. The file I'm requesting from this sever is an excel spreadsheet (.xlsx). I get a valid response back via an xml doc from the server. In this xml file I get... (8 Replies)
Discussion started by: timj123
8 Replies

10. UNIX for Beginners Questions & Answers

How to insert data into black column( Secound Column ) in excel (.XLSX) file using shell script?

Source Code of the original script is down below please run the script and try to solve this problem this is my data and I want it column wise 2019-03-20 13:00:00:000 2019-03-20 15:00:00:000 1 Operating System LAB 0 1 1 1 1 1 1 1 1 1 0 1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
QWSInputMethod(3qt)													       QWSInputMethod(3qt)

NAME
QWSInputMethod - International input methods for Qt/Embedded SYNOPSIS
#include <qwindowsystem_qws.h> Public Members QWSInputMethod () virtual ~QWSInputMethod () virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) = 0 virtual void reset () virtual void setMicroFocus ( int x, int y ) virtual void setFont ( const QFont & ) Protected Members void sendIMEvent ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 ) DESCRIPTION
The QWSInputMethod class provides international input methods for Qt/Embedded. Subclass this class to implement your own input method. An input methods consists of a keyboard filter and optionally a graphical interface. The keyboard filter intercepts key events from physical or virtual keyboards by implementing the filter() function. Use sendIMEvent() to send composition events. Composition starts with the input method sending an IMStart event, followed by a number of IMCompose events and ending with an IMEnd event or when the virtual reset() function is called. The functions setMicroFocus() and setFont() can be reimplemented to receive more information about the state of the focus widget. Use QWSServer::setCurrentInputMethod() to install an input method. See also Qt/Embedded. MEMBER FUNCTION DOCUMENTATION
QWSInputMethod::QWSInputMethod () Constructs a new input method QWSInputMethod::~QWSInputMethod () [virtual] Destructs the input method uninstalling it if it is currently installed. bool QWSInputMethod::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) [pure virtual] This function must be implemented in subclasses to handle key input from physical or virtual keyboards. Returning TRUE will block the event from further processing. The Unicode value is given in unicode and the key code in keycode. Keyboard modifiers are OR-ed together in modifiers. If isPress is TRUE this is a key press; otherwise it is a key release. If autoRepeat is TRUE this is an auto-repeated key press. All normal key events should be blocked while in compose mode (i.e., between IMStart and IMEnd). void QWSInputMethod::reset () [virtual] Implemented in subclasses to reset the state of the input method. void QWSInputMethod::sendIMEvent ( QWSServer::IMState state, const QString & txt, int cpos, int selLen = 0 ) [protected] Causes a QIMEvent to be sent to the focus widget. state may be one of QWSServer::IMStart, QWSServer::IMCompose or QWSServer::IMEnd. txt is the text being composed (or the finished text if state is IMEnd). cpos is the current cursor position. If state is IMCompose, selLen is the number of characters in the composition string (starting at cpos) that should be marked as selected by the input widget receiving the event. void QWSInputMethod::setFont ( const QFont & ) [virtual] Implemented in subclasses to handle font changes in the focus widget. This functionality is provided for future expansion; it is not used in this version of Qt/Embedded. void QWSInputMethod::setMicroFocus ( int x, int y ) [virtual] Implemented in subclasses to handle microFocusHint changes in the focus widget. x and y are the global coordinates of the text cursor. SEE ALSO
http://doc.trolltech.com/qwsinputmethod.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qwsinputmethod.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QWSInputMethod(3qt)
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy