how to set the columns in pandasHow to merge two dictionaries in a single expression?How do I check whether a file exists without exceptions?Selecting multiple columns in a pandas dataframeRenaming columns in pandasAdding new column to existing DataFrame in Python pandasDelete column from pandas DataFrame“Large data” work flows using pandasHow to iterate over rows in a DataFrame in Pandas?Select rows from a DataFrame based on values in a column in pandasGet list from pandas DataFrame column headers

Go function to test whether a file exists

How frequently do Russian people still refer to others by their patronymic (отчество)?

Does a reference have a storage location?

Finding integer database columns that may have their data type changed to reduce size

Is my background sufficient to start Quantum Computing

What instances can be solved today by modern solvers (pure LP)?

What verb goes with "coup"?

Show that there are infinitely more problems than we will ever be able to compute

gzip compress a local folder and extract it to remote server

How did sloshing prevent the Apollo Service Module from moving safely away from the Command Module and how was this fixed?

What is -(-2,3,4)?

A student "completes" 2-week project in 3 hours and lies about doing it himself

Bypass with wrong cvv of debit card and getting OTP

Upload csv into QGIS

Should I warn my boss I might take sick leave

Phrase origin: "You ain't got to go home but you got to get out of here."

Use real text instead of lipsum in moderncv quote alignment

How might boat designs change in order to allow them to be pulled by dragons?

CPLEX exceeds time limit issue

Construction of the word подтвержда́ть

Is there ever a reason not to use Java 8's parallelSort?

How to travel between two stationary worlds in the least amount of time? (time dilation)

PhD: When to quit and move on?

Why did my leaking pool light trip the circuit breaker, but not the GFCI?



how to set the columns in pandas


How to merge two dictionaries in a single expression?How do I check whether a file exists without exceptions?Selecting multiple columns in a pandas dataframeRenaming columns in pandasAdding new column to existing DataFrame in Python pandasDelete column from pandas DataFrame“Large data” work flows using pandasHow to iterate over rows in a DataFrame in Pandas?Select rows from a DataFrame based on values in a column in pandasGet list from pandas DataFrame column headers






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








8















here is my dataframe -:



 Dec-18 Jan-19 Feb-19 Mar-19 Apr-19 May-19
Saturday 2540.0 2441.0 3832.0 4093.0 1455.0 2552.0
Sunday 1313.0 1891.0 2968.0 2260.0 1454.0 1798.0
Monday 1360.0 1558.0 2967.0 2156.0 1564.0 1752.0
Tuesday 1089.0 2105.0 2476.0 1577.0 1744.0 1457.0
Wednesday 1329.0 1658.0 2073.0 2403.0 1231.0 874.0
Thursday 798.0 1195.0 2183.0 1287.0 1460.0 1269.0


i have tried some pandas ops but i am not able to do that



this is what i want to do



 items
Saturday 2540.0
Sunday 1313.0
Monday 1360.0
Tuesday 1089.0
Wednesday 1329.0
Thursday 798.0
Saturday 2441.0
Sunday 1891.0
Monday 1558.0
Tuesday 2105.0
Wednesday 1658.0
Thursday 1195.0 ............ and so on


i want to set those rows into rows in downside



how to do that?



thanks in advance










share|improve this question

















  • 2





    Try: df.reset_index().melt() by index

    – political scientist
    8 hours ago


















8















here is my dataframe -:



 Dec-18 Jan-19 Feb-19 Mar-19 Apr-19 May-19
Saturday 2540.0 2441.0 3832.0 4093.0 1455.0 2552.0
Sunday 1313.0 1891.0 2968.0 2260.0 1454.0 1798.0
Monday 1360.0 1558.0 2967.0 2156.0 1564.0 1752.0
Tuesday 1089.0 2105.0 2476.0 1577.0 1744.0 1457.0
Wednesday 1329.0 1658.0 2073.0 2403.0 1231.0 874.0
Thursday 798.0 1195.0 2183.0 1287.0 1460.0 1269.0


i have tried some pandas ops but i am not able to do that



this is what i want to do



 items
Saturday 2540.0
Sunday 1313.0
Monday 1360.0
Tuesday 1089.0
Wednesday 1329.0
Thursday 798.0
Saturday 2441.0
Sunday 1891.0
Monday 1558.0
Tuesday 2105.0
Wednesday 1658.0
Thursday 1195.0 ............ and so on


i want to set those rows into rows in downside



how to do that?



thanks in advance










share|improve this question

















  • 2





    Try: df.reset_index().melt() by index

    – political scientist
    8 hours ago














8












8








8


2






here is my dataframe -:



 Dec-18 Jan-19 Feb-19 Mar-19 Apr-19 May-19
Saturday 2540.0 2441.0 3832.0 4093.0 1455.0 2552.0
Sunday 1313.0 1891.0 2968.0 2260.0 1454.0 1798.0
Monday 1360.0 1558.0 2967.0 2156.0 1564.0 1752.0
Tuesday 1089.0 2105.0 2476.0 1577.0 1744.0 1457.0
Wednesday 1329.0 1658.0 2073.0 2403.0 1231.0 874.0
Thursday 798.0 1195.0 2183.0 1287.0 1460.0 1269.0


i have tried some pandas ops but i am not able to do that



this is what i want to do



 items
Saturday 2540.0
Sunday 1313.0
Monday 1360.0
Tuesday 1089.0
Wednesday 1329.0
Thursday 798.0
Saturday 2441.0
Sunday 1891.0
Monday 1558.0
Tuesday 2105.0
Wednesday 1658.0
Thursday 1195.0 ............ and so on


i want to set those rows into rows in downside



how to do that?



thanks in advance










share|improve this question














here is my dataframe -:



 Dec-18 Jan-19 Feb-19 Mar-19 Apr-19 May-19
Saturday 2540.0 2441.0 3832.0 4093.0 1455.0 2552.0
Sunday 1313.0 1891.0 2968.0 2260.0 1454.0 1798.0
Monday 1360.0 1558.0 2967.0 2156.0 1564.0 1752.0
Tuesday 1089.0 2105.0 2476.0 1577.0 1744.0 1457.0
Wednesday 1329.0 1658.0 2073.0 2403.0 1231.0 874.0
Thursday 798.0 1195.0 2183.0 1287.0 1460.0 1269.0


i have tried some pandas ops but i am not able to do that



this is what i want to do



 items
Saturday 2540.0
Sunday 1313.0
Monday 1360.0
Tuesday 1089.0
Wednesday 1329.0
Thursday 798.0
Saturday 2441.0
Sunday 1891.0
Monday 1558.0
Tuesday 2105.0
Wednesday 1658.0
Thursday 1195.0 ............ and so on


i want to set those rows into rows in downside



how to do that?



thanks in advance







python pandas dataframe






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 8 hours ago









jonyjony

505 bronze badges




505 bronze badges







  • 2





    Try: df.reset_index().melt() by index

    – political scientist
    8 hours ago













  • 2





    Try: df.reset_index().melt() by index

    – political scientist
    8 hours ago








2




2





Try: df.reset_index().melt() by index

– political scientist
8 hours ago






Try: df.reset_index().melt() by index

– political scientist
8 hours ago













3 Answers
3






active

oldest

votes


















6














df.reset_index().melt(id_vars='index').drop('variable',1)


Output:



 index value
0 Saturday 2540.0
1 Sunday 1313.0
2 Monday 1360.0
3 Tuesday 1089.0
4 Wednesday 1329.0
5 Thursday 798.0
6 Saturday 2441.0
7 Sunday 1891.0
8 Monday 1558.0
9 Tuesday 2105.0
10 Wednesday 1658.0
11 Thursday 1195.0
12 Saturday 3832.0
13 Sunday 2968.0
14 Monday 2967.0
15 Tuesday 2476.0
16 Wednesday 2073.0
17 Thursday 2183.0
18 Saturday 4093.0
19 Sunday 2260.0
20 Monday 2156.0
21 Tuesday 1577.0
22 Wednesday 2403.0
23 Thursday 1287.0
24 Saturday 1455.0
25 Sunday 1454.0
26 Monday 1564.0
27 Tuesday 1744.0
28 Wednesday 1231.0
29 Thursday 1460.0
30 Saturday 2552.0
31 Sunday 1798.0
32 Monday 1752.0
33 Tuesday 1457.0
34 Wednesday 874.0
35 Thursday 1269.0


Note: just noted a commented suggesting to do the same thing, I will delete my post if requested :)






share|improve this answer






























    6














    Create it with numpy by reshaping the data.



    import pandas as pd
    import numpy as np

    pd.DataFrame(df.to_numpy().flatten('F'),
    index=np.tile(df.index, df.shape[1]),
    columns=['items'])


    Output:



     items
    Saturday 2540.0
    Sunday 1313.0
    Monday 1360.0
    Tuesday 1089.0
    Wednesday 1329.0
    Thursday 798.0
    Saturday 2441.0
    ...
    Sunday 1798.0
    Monday 1752.0
    Tuesday 1457.0
    Wednesday 874.0
    Thursday 1269.0





    share|improve this answer




















    • 1





      My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

      – piRSquared
      8 hours ago











    • @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

      – d_kennetz
      7 hours ago











    • @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

      – ALollz
      5 hours ago






    • 1





      Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

      – Peter Leimbigler
      2 hours ago


















    3














    You can do:



    df = df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')


    It is interesting that this method got overlooked even though it is the fastest:



    import time
    start = time.time()
    df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')
    end = time.time()
    print("time taken ".format(end-start))


    yields: time taken 0.006181955337524414



    while this:



    start = time.time()
    df.reset_index().melt(id_vars='days').drop('variable',1)
    end = time.time()
    print("time taken ".format(end-start))


    yields: time taken 0.010072708129882812



    Any my output format matches OP's requested exactly.






    share|improve this answer

























    • Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

      – Peter Leimbigler
      8 hours ago












    • @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

      – d_kennetz
      7 hours ago












    • Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

      – Peter Leimbigler
      7 hours ago






    • 2





      @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

      – piRSquared
      7 hours ago











    • Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

      – piRSquared
      7 hours ago













    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',
    autoActivateHeartbeat: false,
    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%2f56841907%2fhow-to-set-the-columns-in-pandas%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









    6














    df.reset_index().melt(id_vars='index').drop('variable',1)


    Output:



     index value
    0 Saturday 2540.0
    1 Sunday 1313.0
    2 Monday 1360.0
    3 Tuesday 1089.0
    4 Wednesday 1329.0
    5 Thursday 798.0
    6 Saturday 2441.0
    7 Sunday 1891.0
    8 Monday 1558.0
    9 Tuesday 2105.0
    10 Wednesday 1658.0
    11 Thursday 1195.0
    12 Saturday 3832.0
    13 Sunday 2968.0
    14 Monday 2967.0
    15 Tuesday 2476.0
    16 Wednesday 2073.0
    17 Thursday 2183.0
    18 Saturday 4093.0
    19 Sunday 2260.0
    20 Monday 2156.0
    21 Tuesday 1577.0
    22 Wednesday 2403.0
    23 Thursday 1287.0
    24 Saturday 1455.0
    25 Sunday 1454.0
    26 Monday 1564.0
    27 Tuesday 1744.0
    28 Wednesday 1231.0
    29 Thursday 1460.0
    30 Saturday 2552.0
    31 Sunday 1798.0
    32 Monday 1752.0
    33 Tuesday 1457.0
    34 Wednesday 874.0
    35 Thursday 1269.0


    Note: just noted a commented suggesting to do the same thing, I will delete my post if requested :)






    share|improve this answer



























      6














      df.reset_index().melt(id_vars='index').drop('variable',1)


      Output:



       index value
      0 Saturday 2540.0
      1 Sunday 1313.0
      2 Monday 1360.0
      3 Tuesday 1089.0
      4 Wednesday 1329.0
      5 Thursday 798.0
      6 Saturday 2441.0
      7 Sunday 1891.0
      8 Monday 1558.0
      9 Tuesday 2105.0
      10 Wednesday 1658.0
      11 Thursday 1195.0
      12 Saturday 3832.0
      13 Sunday 2968.0
      14 Monday 2967.0
      15 Tuesday 2476.0
      16 Wednesday 2073.0
      17 Thursday 2183.0
      18 Saturday 4093.0
      19 Sunday 2260.0
      20 Monday 2156.0
      21 Tuesday 1577.0
      22 Wednesday 2403.0
      23 Thursday 1287.0
      24 Saturday 1455.0
      25 Sunday 1454.0
      26 Monday 1564.0
      27 Tuesday 1744.0
      28 Wednesday 1231.0
      29 Thursday 1460.0
      30 Saturday 2552.0
      31 Sunday 1798.0
      32 Monday 1752.0
      33 Tuesday 1457.0
      34 Wednesday 874.0
      35 Thursday 1269.0


      Note: just noted a commented suggesting to do the same thing, I will delete my post if requested :)






      share|improve this answer

























        6












        6








        6







        df.reset_index().melt(id_vars='index').drop('variable',1)


        Output:



         index value
        0 Saturday 2540.0
        1 Sunday 1313.0
        2 Monday 1360.0
        3 Tuesday 1089.0
        4 Wednesday 1329.0
        5 Thursday 798.0
        6 Saturday 2441.0
        7 Sunday 1891.0
        8 Monday 1558.0
        9 Tuesday 2105.0
        10 Wednesday 1658.0
        11 Thursday 1195.0
        12 Saturday 3832.0
        13 Sunday 2968.0
        14 Monday 2967.0
        15 Tuesday 2476.0
        16 Wednesday 2073.0
        17 Thursday 2183.0
        18 Saturday 4093.0
        19 Sunday 2260.0
        20 Monday 2156.0
        21 Tuesday 1577.0
        22 Wednesday 2403.0
        23 Thursday 1287.0
        24 Saturday 1455.0
        25 Sunday 1454.0
        26 Monday 1564.0
        27 Tuesday 1744.0
        28 Wednesday 1231.0
        29 Thursday 1460.0
        30 Saturday 2552.0
        31 Sunday 1798.0
        32 Monday 1752.0
        33 Tuesday 1457.0
        34 Wednesday 874.0
        35 Thursday 1269.0


        Note: just noted a commented suggesting to do the same thing, I will delete my post if requested :)






        share|improve this answer













        df.reset_index().melt(id_vars='index').drop('variable',1)


        Output:



         index value
        0 Saturday 2540.0
        1 Sunday 1313.0
        2 Monday 1360.0
        3 Tuesday 1089.0
        4 Wednesday 1329.0
        5 Thursday 798.0
        6 Saturday 2441.0
        7 Sunday 1891.0
        8 Monday 1558.0
        9 Tuesday 2105.0
        10 Wednesday 1658.0
        11 Thursday 1195.0
        12 Saturday 3832.0
        13 Sunday 2968.0
        14 Monday 2967.0
        15 Tuesday 2476.0
        16 Wednesday 2073.0
        17 Thursday 2183.0
        18 Saturday 4093.0
        19 Sunday 2260.0
        20 Monday 2156.0
        21 Tuesday 1577.0
        22 Wednesday 2403.0
        23 Thursday 1287.0
        24 Saturday 1455.0
        25 Sunday 1454.0
        26 Monday 1564.0
        27 Tuesday 1744.0
        28 Wednesday 1231.0
        29 Thursday 1460.0
        30 Saturday 2552.0
        31 Sunday 1798.0
        32 Monday 1752.0
        33 Tuesday 1457.0
        34 Wednesday 874.0
        35 Thursday 1269.0


        Note: just noted a commented suggesting to do the same thing, I will delete my post if requested :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 8 hours ago









        YucaYuca

        3,8032 gold badges10 silver badges27 bronze badges




        3,8032 gold badges10 silver badges27 bronze badges























            6














            Create it with numpy by reshaping the data.



            import pandas as pd
            import numpy as np

            pd.DataFrame(df.to_numpy().flatten('F'),
            index=np.tile(df.index, df.shape[1]),
            columns=['items'])


            Output:



             items
            Saturday 2540.0
            Sunday 1313.0
            Monday 1360.0
            Tuesday 1089.0
            Wednesday 1329.0
            Thursday 798.0
            Saturday 2441.0
            ...
            Sunday 1798.0
            Monday 1752.0
            Tuesday 1457.0
            Wednesday 874.0
            Thursday 1269.0





            share|improve this answer




















            • 1





              My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

              – piRSquared
              8 hours ago











            • @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

              – d_kennetz
              7 hours ago











            • @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

              – ALollz
              5 hours ago






            • 1





              Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

              – Peter Leimbigler
              2 hours ago















            6














            Create it with numpy by reshaping the data.



            import pandas as pd
            import numpy as np

            pd.DataFrame(df.to_numpy().flatten('F'),
            index=np.tile(df.index, df.shape[1]),
            columns=['items'])


            Output:



             items
            Saturday 2540.0
            Sunday 1313.0
            Monday 1360.0
            Tuesday 1089.0
            Wednesday 1329.0
            Thursday 798.0
            Saturday 2441.0
            ...
            Sunday 1798.0
            Monday 1752.0
            Tuesday 1457.0
            Wednesday 874.0
            Thursday 1269.0





            share|improve this answer




















            • 1





              My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

              – piRSquared
              8 hours ago











            • @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

              – d_kennetz
              7 hours ago











            • @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

              – ALollz
              5 hours ago






            • 1





              Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

              – Peter Leimbigler
              2 hours ago













            6












            6








            6







            Create it with numpy by reshaping the data.



            import pandas as pd
            import numpy as np

            pd.DataFrame(df.to_numpy().flatten('F'),
            index=np.tile(df.index, df.shape[1]),
            columns=['items'])


            Output:



             items
            Saturday 2540.0
            Sunday 1313.0
            Monday 1360.0
            Tuesday 1089.0
            Wednesday 1329.0
            Thursday 798.0
            Saturday 2441.0
            ...
            Sunday 1798.0
            Monday 1752.0
            Tuesday 1457.0
            Wednesday 874.0
            Thursday 1269.0





            share|improve this answer















            Create it with numpy by reshaping the data.



            import pandas as pd
            import numpy as np

            pd.DataFrame(df.to_numpy().flatten('F'),
            index=np.tile(df.index, df.shape[1]),
            columns=['items'])


            Output:



             items
            Saturday 2540.0
            Sunday 1313.0
            Monday 1360.0
            Tuesday 1089.0
            Wednesday 1329.0
            Thursday 798.0
            Saturday 2441.0
            ...
            Sunday 1798.0
            Monday 1752.0
            Tuesday 1457.0
            Wednesday 874.0
            Thursday 1269.0






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 2 hours ago

























            answered 8 hours ago









            ALollzALollz

            19.8k5 gold badges18 silver badges40 bronze badges




            19.8k5 gold badges18 silver badges40 bronze badges







            • 1





              My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

              – piRSquared
              8 hours ago











            • @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

              – d_kennetz
              7 hours ago











            • @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

              – ALollz
              5 hours ago






            • 1





              Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

              – Peter Leimbigler
              2 hours ago












            • 1





              My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

              – piRSquared
              8 hours ago











            • @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

              – d_kennetz
              7 hours ago











            • @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

              – ALollz
              5 hours ago






            • 1





              Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

              – Peter Leimbigler
              2 hours ago







            1




            1





            My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

            – piRSquared
            8 hours ago





            My answer was virtually identical to this. a = df.to_numpy(); pd.DataFrame(np.reshape(a, (-1, 1), 'F'), np.resize(df.index, a.size), ['items'])

            – piRSquared
            8 hours ago













            @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

            – d_kennetz
            7 hours ago





            @piRSquared my answer was faster than the accepted answer and matches the output requested exactly, while the accepted answer does not. Mine was also first posted. Sometimes things just don't make sense do they :P.

            – d_kennetz
            7 hours ago













            @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

            – ALollz
            5 hours ago





            @piRSquared want me to add yours to this solution? (or feel free to edit yourself :D)

            – ALollz
            5 hours ago




            1




            1





            Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

            – Peter Leimbigler
            2 hours ago





            Minor fix: the argument to np.tile should be df.shape[1] instead of df.shape[0], which only happens to work on this example data because it is square!

            – Peter Leimbigler
            2 hours ago











            3














            You can do:



            df = df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')


            It is interesting that this method got overlooked even though it is the fastest:



            import time
            start = time.time()
            df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.006181955337524414



            while this:



            start = time.time()
            df.reset_index().melt(id_vars='days').drop('variable',1)
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.010072708129882812



            Any my output format matches OP's requested exactly.






            share|improve this answer

























            • Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

              – Peter Leimbigler
              8 hours ago












            • @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

              – d_kennetz
              7 hours ago












            • Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

              – Peter Leimbigler
              7 hours ago






            • 2





              @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

              – piRSquared
              7 hours ago











            • Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

              – piRSquared
              7 hours ago















            3














            You can do:



            df = df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')


            It is interesting that this method got overlooked even though it is the fastest:



            import time
            start = time.time()
            df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.006181955337524414



            while this:



            start = time.time()
            df.reset_index().melt(id_vars='days').drop('variable',1)
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.010072708129882812



            Any my output format matches OP's requested exactly.






            share|improve this answer

























            • Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

              – Peter Leimbigler
              8 hours ago












            • @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

              – d_kennetz
              7 hours ago












            • Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

              – Peter Leimbigler
              7 hours ago






            • 2





              @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

              – piRSquared
              7 hours ago











            • Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

              – piRSquared
              7 hours ago













            3












            3








            3







            You can do:



            df = df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')


            It is interesting that this method got overlooked even though it is the fastest:



            import time
            start = time.time()
            df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.006181955337524414



            while this:



            start = time.time()
            df.reset_index().melt(id_vars='days').drop('variable',1)
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.010072708129882812



            Any my output format matches OP's requested exactly.






            share|improve this answer















            You can do:



            df = df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')


            It is interesting that this method got overlooked even though it is the fastest:



            import time
            start = time.time()
            df.stack().sort_index(level=1).reset_index(level = 1, drop=True).to_frame('items')
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.006181955337524414



            while this:



            start = time.time()
            df.reset_index().melt(id_vars='days').drop('variable',1)
            end = time.time()
            print("time taken ".format(end-start))


            yields: time taken 0.010072708129882812



            Any my output format matches OP's requested exactly.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 7 hours ago

























            answered 8 hours ago









            d_kennetzd_kennetz

            2,8014 gold badges9 silver badges28 bronze badges




            2,8014 gold badges9 silver badges28 bronze badges












            • Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

              – Peter Leimbigler
              8 hours ago












            • @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

              – d_kennetz
              7 hours ago












            • Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

              – Peter Leimbigler
              7 hours ago






            • 2





              @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

              – piRSquared
              7 hours ago











            • Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

              – piRSquared
              7 hours ago

















            • Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

              – Peter Leimbigler
              8 hours ago












            • @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

              – d_kennetz
              7 hours ago












            • Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

              – Peter Leimbigler
              7 hours ago






            • 2





              @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

              – piRSquared
              7 hours ago











            • Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

              – piRSquared
              7 hours ago
















            Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

            – Peter Leimbigler
            8 hours ago






            Interesting: why does this work? I would expect df.stack().sort_index(level=1) to lexicographically sort the strings Dec-18, Jan-19, etc., but in fact they get sorted in date order, even if they're strings and not datetime objects. df.stack().index.get_level_values(1).sort_values() lexsorts.

            – Peter Leimbigler
            8 hours ago














            @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

            – d_kennetz
            7 hours ago






            @PeterLeimbigler it is sorting based on the order of the columns, not datetime or string. If jan-19 was the first column that would've been sorted first. try it using this setup: df = pd.DataFrame('days': ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'], 'Dec-18': [400,300,200,100,1000,1200], 'Jan-19': [500, 300, 200, 800, 900, 1000]) then: df = df.set_index('days') then: df.stack().sort_index(level=1) Then go back and change the order of the columns and see what appears first.

            – d_kennetz
            7 hours ago














            Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

            – Peter Leimbigler
            7 hours ago





            Thanks for the explanation! This is unexpected behaviour to me. From my testing, it appears that if you stack a DataFrame's columns into a MultiIndex and the result is a Series, then the index remembers the order of the columns, and sorts according to that order. But if the .stack() returns a DataFrame (or if you convert to DataFrame using .stack().to_frame()), the index no longer remembers the order of the original columns.

            – Peter Leimbigler
            7 hours ago




            2




            2





            @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

            – piRSquared
            7 hours ago





            @d_kennetz sometimes they do not. I usually think of answers as general ideas. I judge them accordingly. I give credit for ingenuity and presentation/explanation. I like to see the output from proposed solutions because all to often answers provide a solution that doesn't produce correct output. This doesn't show the results. Also, most of the time, DataFrames aren't big enough for performance to matter. OP goes with what is most understandable to them. Keep up the good fight and answer questions that are beneficial long term. (-:

            – piRSquared
            7 hours ago













            Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

            – piRSquared
            7 hours ago





            Also, use df.unstack().reset_index(0, drop=True).to_frame('items'). By unstack-ing rather than stack-ing, you save yourself from the sorting shenanigans.

            – piRSquared
            7 hours ago

















            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f56841907%2fhow-to-set-the-columns-in-pandas%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

            19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу

            Israel Cuprins Etimologie | Istorie | Geografie | Politică | Demografie | Educație | Economie | Cultură | Note explicative | Note bibliografice | Bibliografie | Legături externe | Meniu de navigaresite web oficialfacebooktweeterGoogle+Instagramcanal YouTubeInstagramtextmodificaremodificarewww.technion.ac.ilnew.huji.ac.ilwww.weizmann.ac.ilwww1.biu.ac.ilenglish.tau.ac.ilwww.haifa.ac.ilin.bgu.ac.ilwww.openu.ac.ilwww.ariel.ac.ilCIA FactbookHarta Israelului"Negotiating Jerusalem," Palestine–Israel JournalThe Schizoid Nature of Modern Hebrew: A Slavic Language in Search of a Semitic Past„Arabic in Israel: an official language and a cultural bridge”„Latest Population Statistics for Israel”„Israel Population”„Tables”„Report for Selected Countries and Subjects”Human Development Report 2016: Human Development for Everyone„Distribution of family income - Gini index”The World FactbookJerusalem Law„Israel”„Israel”„Zionist Leaders: David Ben-Gurion 1886–1973”„The status of Jerusalem”„Analysis: Kadima's big plans”„Israel's Hard-Learned Lessons”„The Legacy of Undefined Borders, Tel Aviv Notes No. 40, 5 iunie 2002”„Israel Journal: A Land Without Borders”„Population”„Israel closes decade with population of 7.5 million”Time Series-DataBank„Selected Statistics on Jerusalem Day 2007 (Hebrew)”Golan belongs to Syria, Druze protestGlobal Survey 2006: Middle East Progress Amid Global Gains in FreedomWHO: Life expectancy in Israel among highest in the worldInternational Monetary Fund, World Economic Outlook Database, April 2011: Nominal GDP list of countries. Data for the year 2010.„Israel's accession to the OECD”Popular Opinion„On the Move”Hosea 12:5„Walking the Bible Timeline”„Palestine: History”„Return to Zion”An invention called 'the Jewish people' – Haaretz – Israel NewsoriginalJewish and Non-Jewish Population of Palestine-Israel (1517–2004)ImmigrationJewishvirtuallibrary.orgChapter One: The Heralders of Zionism„The birth of modern Israel: A scrap of paper that changed history”„League of Nations: The Mandate for Palestine, 24 iulie 1922”The Population of Palestine Prior to 1948originalBackground Paper No. 47 (ST/DPI/SER.A/47)History: Foreign DominationTwo Hundred and Seventh Plenary Meeting„Israel (Labor Zionism)”Population, by Religion and Population GroupThe Suez CrisisAdolf EichmannJustice Ministry Reply to Amnesty International Report„The Interregnum”Israel Ministry of Foreign Affairs – The Palestinian National Covenant- July 1968Research on terrorism: trends, achievements & failuresThe Routledge Atlas of the Arab–Israeli conflict: The Complete History of the Struggle and the Efforts to Resolve It"George Habash, Palestinian Terrorism Tactician, Dies at 82."„1973: Arab states attack Israeli forces”Agranat Commission„Has Israel Annexed East Jerusalem?”original„After 4 Years, Intifada Still Smolders”From the End of the Cold War to 2001originalThe Oslo Accords, 1993Israel-PLO Recognition – Exchange of Letters between PM Rabin and Chairman Arafat – Sept 9- 1993Foundation for Middle East PeaceSources of Population Growth: Total Israeli Population and Settler Population, 1991–2003original„Israel marks Rabin assassination”The Wye River Memorandumoriginal„West Bank barrier route disputed, Israeli missile kills 2”"Permanent Ceasefire to Be Based on Creation Of Buffer Zone Free of Armed Personnel Other than UN, Lebanese Forces"„Hezbollah kills 8 soldiers, kidnaps two in offensive on northern border”„Olmert confirms peace talks with Syria”„Battleground Gaza: Israeli ground forces invade the strip”„IDF begins Gaza troop withdrawal, hours after ending 3-week offensive”„THE LAND: Geography and Climate”„Area of districts, sub-districts, natural regions and lakes”„Israel - Geography”„Makhteshim Country”Israel and the Palestinian Territories„Makhtesh Ramon”„The Living Dead Sea”„Temperatures reach record high in Pakistan”„Climate Extremes In Israel”Israel in figures„Deuteronom”„JNF: 240 million trees planted since 1901”„Vegetation of Israel and Neighboring Countries”Environmental Law in Israel„Executive branch”„Israel's election process explained”„The Electoral System in Israel”„Constitution for Israel”„All 120 incoming Knesset members”„Statul ISRAEL”„The Judiciary: The Court System”„Israel's high court unique in region”„Israel and the International Criminal Court: A Legal Battlefield”„Localities and population, by population group, district, sub-district and natural region”„Israel: Districts, Major Cities, Urban Localities & Metropolitan Areas”„Israel-Egypt Relations: Background & Overview of Peace Treaty”„Solana to Haaretz: New Rules of War Needed for Age of Terror”„Israel's Announcement Regarding Settlements”„United Nations Security Council Resolution 497”„Security Council resolution 478 (1980) on the status of Jerusalem”„Arabs will ask U.N. to seek razing of Israeli wall”„Olmert: Willing to trade land for peace”„Mapping Peace between Syria and Israel”„Egypt: Israel must accept the land-for-peace formula”„Israel: Age structure from 2005 to 2015”„Global, regional, and national disability-adjusted life years (DALYs) for 306 diseases and injuries and healthy life expectancy (HALE) for 188 countries, 1990–2013: quantifying the epidemiological transition”10.1016/S0140-6736(15)61340-X„World Health Statistics 2014”„Life expectancy for Israeli men world's 4th highest”„Family Structure and Well-Being Across Israel's Diverse Population”„Fertility among Jewish and Muslim Women in Israel, by Level of Religiosity, 1979-2009”„Israel leaders in birth rate, but poverty major challenge”„Ethnic Groups”„Israel's population: Over 8.5 million”„Israel - Ethnic groups”„Jews, by country of origin and age”„Minority Communities in Israel: Background & Overview”„Israel”„Language in Israel”„Selected Data from the 2011 Social Survey on Mastery of the Hebrew Language and Usage of Languages”„Religions”„5 facts about Israeli Druze, a unique religious and ethnic group”„Israël”Israel Country Study Guide„Haredi city in Negev – blessing or curse?”„New town Harish harbors hopes of being more than another Pleasantville”„List of localities, in alphabetical order”„Muncitorii români, doriți în Israel”„Prietenia româno-israeliană la nevoie se cunoaște”„The Higher Education System in Israel”„Middle East”„Academic Ranking of World Universities 2016”„Israel”„Israel”„Jewish Nobel Prize Winners”„All Nobel Prizes in Literature”„All Nobel Peace Prizes”„All Prizes in Economic Sciences”„All Nobel Prizes in Chemistry”„List of Fields Medallists”„Sakharov Prize”„Țara care și-a sfidat "destinul" și se bate umăr la umăr cu Silicon Valley”„Apple's R&D center in Israel grew to about 800 employees”„Tim Cook: Apple's Herzliya R&D center second-largest in world”„Lecții de economie de la Israel”„Land use”Israel Investment and Business GuideA Country Study: IsraelCentral Bureau of StatisticsFlorin Diaconu, „Kadima: Flexibilitate și pragmatism, dar nici un compromis în chestiuni vitale", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 71-72Florin Diaconu, „Likud: Dreapta israeliană constant opusă retrocedării teritoriilor cureite prin luptă în 1967", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 73-74MassadaIsraelul a crescut in 50 de ani cât alte state intr-un mileniuIsrael Government PortalIsraelIsraelIsraelmmmmmXX451232cb118646298(data)4027808-634110000 0004 0372 0767n7900328503691455-bb46-37e3-91d2-cb064a35ffcc1003570400564274ge1294033523775214929302638955X146498911146498911

            Черчино Становништво Референце Спољашње везе Мени за навигацију46°09′29″ СГШ; 9°30′29″ ИГД / 46.15809° СГШ; 9.50814° ИГД / 46.15809; 9.5081446°09′29″ СГШ; 9°30′29″ ИГД / 46.15809° СГШ; 9.50814° ИГД / 46.15809; 9.508143179111„The GeoNames geographical database”„Istituto Nazionale di Statistica”Званични веб-сајтпроширитиуу