Answer to Question #313874 in Python for 123456

Question #313874

some tic values are divided into two parts . You have to combine these two parts into one tic string. Then, load the data into a dataframe

like this:

20141130 GIS 7713.1

20150228 GIS 6642.6

20150531 GIS 7607.7

19990630 GNT X          0.0000

19990930 GNT X          0.0000

19991231 GNT X          0.0000

20000331 GNT X          0.0000

20000630 GNT X          0.0000

The above is correct, the below converts to the above


1
Expert's answer
2022-03-18T15:33:14-0400
import pandas as pd
def load_tic(str1, str2):
    list1 = []
    dic = {}
    for i in str1:
        list1.append(str1 + str2)
    dic['tic_str'] = list1
    return pd.DataFrame(dic)
    

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS