Ask Your Question
1

Table intercolumn spaces

asked 2023-05-31 17:03:29 +0200

Cyrille gravatar image

This code

A = matrix([[3, 1], [0, 2]])
B = matrix([[2, 1], [0, 3]])
bots = NormalFormGame([A, B])
botsr=[[tuple(bots[(0,0)]),tuple(bots[(0,1)])],[tuple(bots[(1,0)]),tuple(bots[(1,1)])]]
t=table(botsr,header_row=['Boxe','Ballet'],header_column=['',r'<b> Boxe</b>',r'<b> Ballet</b>'])
show(t)

produce thisimage description. is ther a way to shorten the space between columns because it's ugly

edit retag flag offensive close merge delete

Comments

I do not see the problem at Sagecell - check this out: https://sagecell.sagemath.org/?q=silxnf

Max Alekseyev gravatar imageMax Alekseyev ( 2023-05-31 21:33:05 +0200 )edit

Indeed there is no problem in SageCell. But with SageMath version 9.7 with docker there is a problem

Cyrille gravatar imageCyrille ( 2023-06-01 11:04:00 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-01 07:13:30 +0200

achrzesz gravatar image

In sage 9.8 the workaround works for me:

A = matrix([[3, 1], [0, 2]])
B = matrix([[2, 1], [0, 3]])
bots = NormalFormGame([A, B])
botsr=[[tuple(bots[(0,0)]),tuple(bots[(0,1)])],[tuple(bots[(1,0)]),tuple(bots[(1,1)])]]
import pandas as pd
jpm=pd.DataFrame(botsr, columns=['Boxe', 'Ballet'])
jpm.index = ['Boxe', 'Ballet']
jpm
edit flag offensive delete link more

Comments

Of course it works also for me. But you use Pandas. Because of that I hesitate to say that your answer is a good one. I think there is a bug in Sagemath Table at least for v.9.7

Cyrille gravatar imageCyrille ( 2023-06-01 11:02:56 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-05-31 17:03:29 +0200

Seen: 172 times

Last updated: Jun 01 '23