-1

I'm trying to unstack a correlation matrix and print the values, I get something like this with truncation i.e. not all the values are displayed:

corr_pairs = corr_dict['corr'].unstack()
print(corr_pairs)

Assignment            Assignment                       1.000000
                      Country/Region                   0.242011
                      Interaction ID                   0.000000
                      Incident ID                      0.394528
                      Contact Last Name                0.667224
                                                         ...   
actual_end_plus_12hr  sImplementation on Time Scope   -0.209027
                      sImplementation on Time Met     -0.199003
                      sSuccess Rate Scope             -0.208897
                      sSuccess Rate Met               -0.208897
                      actual_end_plus_12hr             1.000000
Length: 4489, dtype: float64

Whereas I want all the values of the unstacked correlation matrix to be printed without any truncation. Something like this:

corr_pairs = corr_dict['corr'].unstack()
print(corr_pairs)

Assignment            Assignment                       1.000000
                      Country/Region                   0.242011
                      Interaction ID                   0.000000
                      Incident ID                      0.394528
                      Contact Last Name                0.667224
actual_end_plus_12hr  sImplementation on Time Scope   -0.209027
                      sImplementation on Time Met     -0.199003
                      sSuccess Rate Scope             -0.208897
                      sSuccess Rate Met               -0.208897
                      actual_end_plus_12hr             1.000000
actual_end_plus_12hr  sImplementation on Time Scope   -0.209027
                      sImplementation on Time Met     -0.199003
                      sSuccess Rate Scope             -0.208897
                      sSuccess Rate Met               -0.208897
                      actual_end_plus_12hr             1.000000
actual_end_plus_12hr  sImplementation on Time Scope   -0.209027
                      sImplementation on Time Met     -0.199003
                      sSuccess Rate Scope             -0.208897
                      sSuccess Rate Met               -0.208897
                      actual_end_plus_12hr             1.000000
actual_end_plus_12hr  sImplementation on Time Scope   -0.209027
                      sImplementation on Time Met     -0.199003
                      sSuccess Rate Scope             -0.208897
                      sSuccess Rate Met               -0.208897
                      actual_end_plus_12hr             1.000000
Length: 4489, dtype: float64

How can I do that ?

morelloking
  • 193
  • 1
  • 3
  • 11

1 Answers1

0

I found the answer:

print(df.to_string())
zabop
  • 6,750
  • 3
  • 39
  • 84
morelloking
  • 193
  • 1
  • 3
  • 11
  • In accordance with [this](https://meta.stackoverflow.com/questions/400436/is-there-anything-to-do-with-users-with-a-profile-picture-clearly-endorsing-viol?noredirect=1#comment790330_400436), I am flagging this post. If you address the issue, I will retract the flag. – zabop Aug 18 '20 at 21:46