0

HERE is the code:

customers = {'CustomerID': [10, 11],
         'Name': ['Mike', 'Marcia'],
         'Address': ['Address for Mike','Address for Marcia']}
customers = pd.DataFrame(customers)
customers

What I get in my Jupyter notebook is below :

  CustomerID      Name           Address

0         10      Mike  Address for Mike

1         11    Marcia  Address for Marcia

What I want is that it can print the tables with solid borders.

Thanks

Agile_Eagle
  • 1,710
  • 3
  • 13
  • 32
Orchard's Story
  • 127
  • 1
  • 11

1 Answers1

5

it works for me if you copy the following code into any cell in the current jupyter notebook

%%HTML
<style type="text/css">
table.dataframe td, table.dataframe th {
    border-style: solid;
}

more details, please follow the link

Jupyter pandas.DataFrame output table format configuration

Orchard's Story
  • 127
  • 1
  • 11