Coder Social home page Coder Social logo

imaadmkhan1 / dataframe_to_image Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.06 MB

Python package to convert a Pandas DataFrame to a Image that could be used to share dataframe (as an image) in sheets, notes and slides.

Home Page: https://pypi.org/project/dataframe-to-image/0.0.1/

License: MIT License

Python 0.07% Jupyter Notebook 99.93%

dataframe_to_image's Introduction

dataframe_to_image

Python package to convert a Pandas DataFrame to a Image that could be used to share dataframe (as an image) in sheets, notes and slides.

Installation:
pip install dataframe-to-image

Example usage:

import pandas as pd
from dataframe_to_image import dataframe_to_image
#creating the dataframe
df = pd.DataFrame()
df['date'] = ['2021-06-01', '2021-06-02', '2021-06-03']
df['calories'] = [1950, 2100, 1500]
df['sleep hours'] = [9, 7.5, 8.2]
df['gym'] = [True, False, False]
#converting to image
dataframe_to_image.convert(df,visualisation_library='matplotlib')

Example Output

Once you have the image ready, you can right click on the image and click 'Save image as' to save the image of your dataframe (when using matplotlib). For Plotly, you can just click on the camera icon on the top right to save your image.

Usage:
Depending on the visualisation library, the table image will change.
Currently,implementations for two backend libraries have been made - matplotlib and plotly. Please feel free to open PR if you would like to add more backend visualisation libraries.

dataframe_to_image's People

Contributors

imaadmkhan1 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.