react-pandas-table
v1.1.1
Published
A library designed to render Python Pandas tables in a React environment.
Downloads
4
Readme
react-pandas-table
A library designed to render Python Pandas tables in a React environment.
Install
npm install --save react-pandas-table
Example Usage
import React from 'react'
import { BasicTable } from 'react-pandas-table'
const ExampleComponent = () => {
return (
<BasicTable
data={exampleData}
includeIndexCol={false}
reformatCols={[
{
col: 'Exmaple Date Col',
type: 'date',
locale: 'en-GB',
params: {
year: 'numeric',
month: 'long',
day: 'numeric'
}
},
{
col: 'Example Currency Col',
type: 'number',
locale: 'en-GB',
params: {
style: 'currency',
currency: 'EUR'
}
},
{
col: 'Example Percentage Col',
type: 'number',
locale: 'en-GB',
params: {
style: 'percent',
minimumFractionDigits: 2
}
}
]}
total={['Example Currency Col', 'Example Percentage Col']}
headerStyles={{
backgroundColor: '#000000',
color: '#FFFFFF',
padding: 10
}}
cellStyles={{
backgroundColor: '#F3F4F6',
color: '#000000',
padding: 10
}}
/>
)
}
License
MIT © finnmaguire1998