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,572
  • 2
  • 12
  • 27
Orchard's Story
  • 107
  • 1
  • 11

1 Answers1

3

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
  • 107
  • 1
  • 11