Data frame misaligned using Pandas on Python3









up vote
1
down vote

favorite












I have a data which I am trying to store in pandas dataFrame. But, it is appearing in a weird way. I know I am doing something wrong



Can somebody help me in finding whats wrong.



Code



root@optstra:~# cat pandas_1.py
import pandas as pd
import numpy as np

numberOfRows = 1

SYMBOL = 'ABB'
volume_increasing = True
price_increase = True
OI_CHANGE = True
closedAboveYesterday = False
Above_22SMA = False

data_frame = pd.DataFrame(index=np.arange(0, numberOfRows), columns=('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA') )

for x in range(0,numberOfRows):
data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA for n in range(6)]

print(data_frame)


Output



root@optstra:~# python3 pandas_1.py
SYMBOL Volume Price OI OHLC 22SMA
0 False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB


If I change the line which writes the data to data frame as follows



for x in range(0,numberOfRows):
data_frame.loc[x] = [(SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA) for n in range(6)]


Output changes to



root@optstra:~# python3 pandas_1.py
SYMBOL ... 22SMA
0 (ABB, True, True, True, False, False) ... (ABB, True, True, True, False, False)









share|improve this question























  • What format is data? Can you show us in your question?
    – jpp
    Nov 11 at 11:16










  • @jpp they are boolean and string if you see I have data which in the form of variables which I want to organise in tabular format and convert to csv. I am trying to map them like SYMBOL "variable"
    – Vinay Shukla
    Nov 11 at 11:18











  • No, I don't see... all I see is SyntaxError because you haven't defined any of your variables, SYMBOL etc in your question.
    – jpp
    Nov 11 at 11:19










  • Its a running code though I will edit it or create a pseudo code
    – Vinay Shukla
    Nov 11 at 11:20






  • 1




    Where is the data for PCJEWELLER coming from?
    – leeym
    Nov 11 at 11:25














up vote
1
down vote

favorite












I have a data which I am trying to store in pandas dataFrame. But, it is appearing in a weird way. I know I am doing something wrong



Can somebody help me in finding whats wrong.



Code



root@optstra:~# cat pandas_1.py
import pandas as pd
import numpy as np

numberOfRows = 1

SYMBOL = 'ABB'
volume_increasing = True
price_increase = True
OI_CHANGE = True
closedAboveYesterday = False
Above_22SMA = False

data_frame = pd.DataFrame(index=np.arange(0, numberOfRows), columns=('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA') )

for x in range(0,numberOfRows):
data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA for n in range(6)]

print(data_frame)


Output



root@optstra:~# python3 pandas_1.py
SYMBOL Volume Price OI OHLC 22SMA
0 False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB


If I change the line which writes the data to data frame as follows



for x in range(0,numberOfRows):
data_frame.loc[x] = [(SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA) for n in range(6)]


Output changes to



root@optstra:~# python3 pandas_1.py
SYMBOL ... 22SMA
0 (ABB, True, True, True, False, False) ... (ABB, True, True, True, False, False)









share|improve this question























  • What format is data? Can you show us in your question?
    – jpp
    Nov 11 at 11:16










  • @jpp they are boolean and string if you see I have data which in the form of variables which I want to organise in tabular format and convert to csv. I am trying to map them like SYMBOL "variable"
    – Vinay Shukla
    Nov 11 at 11:18











  • No, I don't see... all I see is SyntaxError because you haven't defined any of your variables, SYMBOL etc in your question.
    – jpp
    Nov 11 at 11:19










  • Its a running code though I will edit it or create a pseudo code
    – Vinay Shukla
    Nov 11 at 11:20






  • 1




    Where is the data for PCJEWELLER coming from?
    – leeym
    Nov 11 at 11:25












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a data which I am trying to store in pandas dataFrame. But, it is appearing in a weird way. I know I am doing something wrong



Can somebody help me in finding whats wrong.



Code



root@optstra:~# cat pandas_1.py
import pandas as pd
import numpy as np

numberOfRows = 1

SYMBOL = 'ABB'
volume_increasing = True
price_increase = True
OI_CHANGE = True
closedAboveYesterday = False
Above_22SMA = False

data_frame = pd.DataFrame(index=np.arange(0, numberOfRows), columns=('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA') )

for x in range(0,numberOfRows):
data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA for n in range(6)]

print(data_frame)


Output



root@optstra:~# python3 pandas_1.py
SYMBOL Volume Price OI OHLC 22SMA
0 False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB


If I change the line which writes the data to data frame as follows



for x in range(0,numberOfRows):
data_frame.loc[x] = [(SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA) for n in range(6)]


Output changes to



root@optstra:~# python3 pandas_1.py
SYMBOL ... 22SMA
0 (ABB, True, True, True, False, False) ... (ABB, True, True, True, False, False)









share|improve this question















I have a data which I am trying to store in pandas dataFrame. But, it is appearing in a weird way. I know I am doing something wrong



Can somebody help me in finding whats wrong.



Code



root@optstra:~# cat pandas_1.py
import pandas as pd
import numpy as np

numberOfRows = 1

SYMBOL = 'ABB'
volume_increasing = True
price_increase = True
OI_CHANGE = True
closedAboveYesterday = False
Above_22SMA = False

data_frame = pd.DataFrame(index=np.arange(0, numberOfRows), columns=('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA') )

for x in range(0,numberOfRows):
data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA for n in range(6)]

print(data_frame)


Output



root@optstra:~# python3 pandas_1.py
SYMBOL Volume Price OI OHLC 22SMA
0 False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB False, True, ABB


If I change the line which writes the data to data frame as follows



for x in range(0,numberOfRows):
data_frame.loc[x] = [(SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA) for n in range(6)]


Output changes to



root@optstra:~# python3 pandas_1.py
SYMBOL ... 22SMA
0 (ABB, True, True, True, False, False) ... (ABB, True, True, True, False, False)






python pandas






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 11:28

























asked Nov 11 at 11:09









Vinay Shukla

1,345627




1,345627











  • What format is data? Can you show us in your question?
    – jpp
    Nov 11 at 11:16










  • @jpp they are boolean and string if you see I have data which in the form of variables which I want to organise in tabular format and convert to csv. I am trying to map them like SYMBOL "variable"
    – Vinay Shukla
    Nov 11 at 11:18











  • No, I don't see... all I see is SyntaxError because you haven't defined any of your variables, SYMBOL etc in your question.
    – jpp
    Nov 11 at 11:19










  • Its a running code though I will edit it or create a pseudo code
    – Vinay Shukla
    Nov 11 at 11:20






  • 1




    Where is the data for PCJEWELLER coming from?
    – leeym
    Nov 11 at 11:25
















  • What format is data? Can you show us in your question?
    – jpp
    Nov 11 at 11:16










  • @jpp they are boolean and string if you see I have data which in the form of variables which I want to organise in tabular format and convert to csv. I am trying to map them like SYMBOL "variable"
    – Vinay Shukla
    Nov 11 at 11:18











  • No, I don't see... all I see is SyntaxError because you haven't defined any of your variables, SYMBOL etc in your question.
    – jpp
    Nov 11 at 11:19










  • Its a running code though I will edit it or create a pseudo code
    – Vinay Shukla
    Nov 11 at 11:20






  • 1




    Where is the data for PCJEWELLER coming from?
    – leeym
    Nov 11 at 11:25















What format is data? Can you show us in your question?
– jpp
Nov 11 at 11:16




What format is data? Can you show us in your question?
– jpp
Nov 11 at 11:16












@jpp they are boolean and string if you see I have data which in the form of variables which I want to organise in tabular format and convert to csv. I am trying to map them like SYMBOL "variable"
– Vinay Shukla
Nov 11 at 11:18





@jpp they are boolean and string if you see I have data which in the form of variables which I want to organise in tabular format and convert to csv. I am trying to map them like SYMBOL "variable"
– Vinay Shukla
Nov 11 at 11:18













No, I don't see... all I see is SyntaxError because you haven't defined any of your variables, SYMBOL etc in your question.
– jpp
Nov 11 at 11:19




No, I don't see... all I see is SyntaxError because you haven't defined any of your variables, SYMBOL etc in your question.
– jpp
Nov 11 at 11:19












Its a running code though I will edit it or create a pseudo code
– Vinay Shukla
Nov 11 at 11:20




Its a running code though I will edit it or create a pseudo code
– Vinay Shukla
Nov 11 at 11:20




1




1




Where is the data for PCJEWELLER coming from?
– leeym
Nov 11 at 11:25




Where is the data for PCJEWELLER coming from?
– leeym
Nov 11 at 11:25












3 Answers
3






active

oldest

votes

















up vote
2
down vote



accepted










Updating an empty frame (e.g. using loc one-row-at-a-time) is inefficient.



So better/faster is create list by append with DataFrame contructor:



data = 
for x in np.arange(numberOfRows):
row = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]
data.append(row)

c = ('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA')
data_frame = pd.DataFrame(data, columns=c)


list comprehension alternative:



data = [[SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA] for x in np.arange(numberOfRows)]





share|improve this answer


















  • 1




    This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
    – jpp
    Nov 11 at 11:56

















up vote
2
down vote













Why don't you try this-- not sure if it's exactly what you're looking for since you took that part out in your edit:



for x in range(0,numberOfRows):
data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]


Output:



 SYMBOL Volume Price OI OHLC 22SMA
0 ABB True True True False False





share|improve this answer
















  • 1




    Thank you !! It was a silly question as I am new to this language :)
    – Vinay Shukla
    Nov 11 at 11:50

















up vote
0
down vote













It seems to me you're not quite indexing the dataframe properly. You can either do this:



for x in range(0, numberOfRows):
data_frame['SYMBOL'][x] = SYMBOL
data_frame['Volume'][x] = volume_increasing
data_frame['Price'][x] = price_increase
data_frame['OI'][x] = OI_CHANGE
data_frame['OHLC'][x] = closedAboveYesterday
data_frame['22SMA'][x] = Above_22SMA


which will give you your desired output, alternatively you can use dictionaries and avoid the for loop altogether:



columns = ['SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA']
data = 'SYMBOL': 'AAB',
'Volume': True,
'Price': True,
'OI': True,
'OHLC': False,
'22SMA': False

data_frame = pd.DataFrame(data=data, index=np.arange(0, 1), columns=columns)





share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248122%2fdata-frame-misaligned-using-pandas-on-python3%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    Updating an empty frame (e.g. using loc one-row-at-a-time) is inefficient.



    So better/faster is create list by append with DataFrame contructor:



    data = 
    for x in np.arange(numberOfRows):
    row = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]
    data.append(row)

    c = ('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA')
    data_frame = pd.DataFrame(data, columns=c)


    list comprehension alternative:



    data = [[SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA] for x in np.arange(numberOfRows)]





    share|improve this answer


















    • 1




      This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
      – jpp
      Nov 11 at 11:56














    up vote
    2
    down vote



    accepted










    Updating an empty frame (e.g. using loc one-row-at-a-time) is inefficient.



    So better/faster is create list by append with DataFrame contructor:



    data = 
    for x in np.arange(numberOfRows):
    row = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]
    data.append(row)

    c = ('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA')
    data_frame = pd.DataFrame(data, columns=c)


    list comprehension alternative:



    data = [[SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA] for x in np.arange(numberOfRows)]





    share|improve this answer


















    • 1




      This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
      – jpp
      Nov 11 at 11:56












    up vote
    2
    down vote



    accepted







    up vote
    2
    down vote



    accepted






    Updating an empty frame (e.g. using loc one-row-at-a-time) is inefficient.



    So better/faster is create list by append with DataFrame contructor:



    data = 
    for x in np.arange(numberOfRows):
    row = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]
    data.append(row)

    c = ('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA')
    data_frame = pd.DataFrame(data, columns=c)


    list comprehension alternative:



    data = [[SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA] for x in np.arange(numberOfRows)]





    share|improve this answer














    Updating an empty frame (e.g. using loc one-row-at-a-time) is inefficient.



    So better/faster is create list by append with DataFrame contructor:



    data = 
    for x in np.arange(numberOfRows):
    row = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]
    data.append(row)

    c = ('SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA')
    data_frame = pd.DataFrame(data, columns=c)


    list comprehension alternative:



    data = [[SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA] for x in np.arange(numberOfRows)]






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 11 at 12:02

























    answered Nov 11 at 11:55









    jezrael

    312k21247323




    312k21247323







    • 1




      This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
      – jpp
      Nov 11 at 11:56












    • 1




      This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
      – jpp
      Nov 11 at 11:56







    1




    1




    This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
    – jpp
    Nov 11 at 11:56




    This should be the accepted answer. pd.DataFrame.loc in a loop is inefficient.
    – jpp
    Nov 11 at 11:56












    up vote
    2
    down vote













    Why don't you try this-- not sure if it's exactly what you're looking for since you took that part out in your edit:



    for x in range(0,numberOfRows):
    data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]


    Output:



     SYMBOL Volume Price OI OHLC 22SMA
    0 ABB True True True False False





    share|improve this answer
















    • 1




      Thank you !! It was a silly question as I am new to this language :)
      – Vinay Shukla
      Nov 11 at 11:50














    up vote
    2
    down vote













    Why don't you try this-- not sure if it's exactly what you're looking for since you took that part out in your edit:



    for x in range(0,numberOfRows):
    data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]


    Output:



     SYMBOL Volume Price OI OHLC 22SMA
    0 ABB True True True False False





    share|improve this answer
















    • 1




      Thank you !! It was a silly question as I am new to this language :)
      – Vinay Shukla
      Nov 11 at 11:50












    up vote
    2
    down vote










    up vote
    2
    down vote









    Why don't you try this-- not sure if it's exactly what you're looking for since you took that part out in your edit:



    for x in range(0,numberOfRows):
    data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]


    Output:



     SYMBOL Volume Price OI OHLC 22SMA
    0 ABB True True True False False





    share|improve this answer












    Why don't you try this-- not sure if it's exactly what you're looking for since you took that part out in your edit:



    for x in range(0,numberOfRows):
    data_frame.loc[x] = [SYMBOL,volume_increasing,price_increase,OI_CHANGE,closedAboveYesterday,Above_22SMA]


    Output:



     SYMBOL Volume Price OI OHLC 22SMA
    0 ABB True True True False False






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 11 at 11:44









    leeym

    3121213




    3121213







    • 1




      Thank you !! It was a silly question as I am new to this language :)
      – Vinay Shukla
      Nov 11 at 11:50












    • 1




      Thank you !! It was a silly question as I am new to this language :)
      – Vinay Shukla
      Nov 11 at 11:50







    1




    1




    Thank you !! It was a silly question as I am new to this language :)
    – Vinay Shukla
    Nov 11 at 11:50




    Thank you !! It was a silly question as I am new to this language :)
    – Vinay Shukla
    Nov 11 at 11:50










    up vote
    0
    down vote













    It seems to me you're not quite indexing the dataframe properly. You can either do this:



    for x in range(0, numberOfRows):
    data_frame['SYMBOL'][x] = SYMBOL
    data_frame['Volume'][x] = volume_increasing
    data_frame['Price'][x] = price_increase
    data_frame['OI'][x] = OI_CHANGE
    data_frame['OHLC'][x] = closedAboveYesterday
    data_frame['22SMA'][x] = Above_22SMA


    which will give you your desired output, alternatively you can use dictionaries and avoid the for loop altogether:



    columns = ['SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA']
    data = 'SYMBOL': 'AAB',
    'Volume': True,
    'Price': True,
    'OI': True,
    'OHLC': False,
    '22SMA': False

    data_frame = pd.DataFrame(data=data, index=np.arange(0, 1), columns=columns)





    share|improve this answer
























      up vote
      0
      down vote













      It seems to me you're not quite indexing the dataframe properly. You can either do this:



      for x in range(0, numberOfRows):
      data_frame['SYMBOL'][x] = SYMBOL
      data_frame['Volume'][x] = volume_increasing
      data_frame['Price'][x] = price_increase
      data_frame['OI'][x] = OI_CHANGE
      data_frame['OHLC'][x] = closedAboveYesterday
      data_frame['22SMA'][x] = Above_22SMA


      which will give you your desired output, alternatively you can use dictionaries and avoid the for loop altogether:



      columns = ['SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA']
      data = 'SYMBOL': 'AAB',
      'Volume': True,
      'Price': True,
      'OI': True,
      'OHLC': False,
      '22SMA': False

      data_frame = pd.DataFrame(data=data, index=np.arange(0, 1), columns=columns)





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        It seems to me you're not quite indexing the dataframe properly. You can either do this:



        for x in range(0, numberOfRows):
        data_frame['SYMBOL'][x] = SYMBOL
        data_frame['Volume'][x] = volume_increasing
        data_frame['Price'][x] = price_increase
        data_frame['OI'][x] = OI_CHANGE
        data_frame['OHLC'][x] = closedAboveYesterday
        data_frame['22SMA'][x] = Above_22SMA


        which will give you your desired output, alternatively you can use dictionaries and avoid the for loop altogether:



        columns = ['SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA']
        data = 'SYMBOL': 'AAB',
        'Volume': True,
        'Price': True,
        'OI': True,
        'OHLC': False,
        '22SMA': False

        data_frame = pd.DataFrame(data=data, index=np.arange(0, 1), columns=columns)





        share|improve this answer












        It seems to me you're not quite indexing the dataframe properly. You can either do this:



        for x in range(0, numberOfRows):
        data_frame['SYMBOL'][x] = SYMBOL
        data_frame['Volume'][x] = volume_increasing
        data_frame['Price'][x] = price_increase
        data_frame['OI'][x] = OI_CHANGE
        data_frame['OHLC'][x] = closedAboveYesterday
        data_frame['22SMA'][x] = Above_22SMA


        which will give you your desired output, alternatively you can use dictionaries and avoid the for loop altogether:



        columns = ['SYMBOL','Volume', 'Price', 'OI','OHLC','22SMA']
        data = 'SYMBOL': 'AAB',
        'Volume': True,
        'Price': True,
        'OI': True,
        'OHLC': False,
        '22SMA': False

        data_frame = pd.DataFrame(data=data, index=np.arange(0, 1), columns=columns)






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 11 at 12:13









        J.Aluko

        163




        163



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248122%2fdata-frame-misaligned-using-pandas-on-python3%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            ReactJS Fetched API data displays live - need Data displayed static

            政党