MySQL Forums
Forum List  »  Connector/Python

Python dataframe
Posted by: Алексей Брик
Date: June 04, 2020 03:22AM

Hello. Can you help me?
How insert into dataframe column which contains sequence number order for each client: first order =1 second=2.
I have table orders: columns orderid clientid orderinfo date.

frame=pd.read_sql("select * from orders where orderinfo not like '%[T%]%' ",
df = pd.DataFrame(frame);
df.to_csv('D:/database/test1.csv', sep=';', index=0, line_terminator='\n',

data example

orderid orderinfo clientid date
4250037527046 458708113298 2020-05-01 00:00:00
4250037527047 458705145222 2020-05-01 00:00:00
4250037527048 458708113329 2020-05-01 00:00:00
4250037527049 [SO] 458707075471 2020-05-01 00:00:00
4250037527051 458700617579 2020-05-01 00:00:00

Options: ReplyQuote

Written By
Python dataframe
June 04, 2020 03:22AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.