# How to print table in landscape mode?

**URL:** <https://community.openastronomy.org/t/how-to-print-table-in-landscape-mode/297>\
**Category:** Astropy\
**Tags:** question\
**Created:** [March 4, 2022, 11:38am UTC](https://community.openastronomy.org/t/how-to-print-table-in-landscape-mode/297 "2022-03-04T11:38:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dadawd](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@dadawd](https://community.openastronomy.org/u/dadawd)\
**Post date:** [March 4, 2022, 11:38am UTC](https://community.openastronomy.org/t/how-to-print-table-in-landscape-mode/297/1 "2022-03-04T11:38:12Z")

</div>

How do I print the table with columns stacked vertically, not horizontally? It is useful when the table has only a few columns, but many elements. Unless I’m blind, seems like an obvious missing feature.

---

<div class="post-metadata">

**Author:** ![dhomeier](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/dhomeier/32/65_2.png) [@dhomeier](https://community.openastronomy.org/u/dhomeier)\
**Post date:** [March 9, 2022, 1:40pm UTC](https://community.openastronomy.org/t/how-to-print-table-in-landscape-mode/297/2 "2022-03-09T13:40:11Z")

</div>

I don’t think there is any convenience method built in for that – tables are more or less assumed to be arranged naturally in columns and rows, so you’d have to put something together yourself like  
`[f'{c}: {np.array(t[c])}' for c in t.columns]` or  
`print('\n'.join([f'{c}: {np.array(t[c])}' for c in t.columns]))`  
– plus all the fine tuning required for nicer formatting.  
Also different columns, unlike different rows, in general may contain completely different formats and object types, making it difficult to devise a generic format to align the items horizontally.  
HTH
