LibrePythonista is an extension for LibreOffice Calc. The extension allows Interactive Python code to be run directly in a spreadsheet. LibrePythonista has its own PIP package manager to install additional Python packages.
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.
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.
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.
LibrePythonista is a powerful tool for data analysis and visualization in LibreOffice Calc. It allows you to:
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.
Alternatively insert using shortcut Shift+Ctl+Alt+L
or by clicking on the toolbar button.
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.
When a cell contains Python code It can be edit by clicking the control and choosing Edit Code.
Or Python cells and charts can right click and choose Pythonista --> Edit Code
Image for the code editor for the example above.