Skip to content

Amourspirit/python_libre_pythonista_ext

Repository files navigation

logo

LibrePythonista

License

LibrePythonista is an extension for LibreOffice Calc. The extension allows Interactive Python code to be run directly in a spreadsheet.

LibrePythonista is currently in beta and is subject to change based on feedback.

LibrePythonista is free and open source software so there are no fees to start using it.

LibrePythonista bring the power of Pandas, Matplotlib and much more to LibreOffice Calc.

All python code is executes on your local computer. This can alleviate many concerns around data privacy as your data

Using LibrePythonista is it possible to create Data frame's, Series, custom Graphs an much more directly in a spreadsheet.

LibrePythonista is built using OOO Development Tools which removes many barriers when working with the LibreOffice API.

What is LibrePythonista?

LibrePythonista brings the power of Python analytics into LibreOffice Calc. Use it to process data in Calc with Python code. You type Python directly into a cell via the code edit window, the Python calculations runs locally, and your results are displayed in the sheet.

500

LibrePythonista comes with a core set of Python libraries. Use Python libraries to simplify your data analysis, find patterns and hidden insights, and visualize your data with plots.

Watch the Introduction Video

Watch the video

Start using Python

To begin using LibrePythonista, select a cell and on the LibrePy menu, Insert Python. This tells Calc that you want to write a Python formula in the selected cell.

menu_001

Alternatively insert using shortcut Shift+Ctl+Alt+L or by clicking on the toolbar button.

toolbar_py_c

LibrePythonista uses the custom Python function lp() to interface between Calc and Python. The lp() function accepts Calc objects like ranges, named ranges, and data ranges. You can also directly type references into a Python cell with the lp() function. For example, to reference cell A1 use lp("A1") and for the range B1:C5 use lp("B1:C5"). For a named range with headers named MyRange, use lp("MyRange", headers=True).

If the range or named range has empty rows at the end of the range then collapse=True can be used. The collapse parameter instructs the Data frame to exclude empty rows at the end of the named range. This way when new data is added to the end of the range the Data frame will automatically recalculate to include the new rows.

Example named df = lp("A2:D81", headers=True, collapse=True)

The following image shows a Python in Calc calculation adding the values of cell A1 and B1, with the Python result returned in cell C1.

image

Code Editing

When a cell contains Python code It can be edit by clicking the control and choosing Edit Code.

image

Or Python cells and charts can right click and choose Pythonista --> Edit Code image

Image for the code editor for the example above. tri_code

Other Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published