PyInsight is a Python library designed to simplify interactive data analysis and visualization directly within the console. With tools for displaying tables, generating plots, analyzing text, and managing live data, PyInsight empowers you to work more efficiently with your data.
- Interactive Tables: Display and filter tabular data interactively.
- Interactive Plots: Create interactive visualizations and plots.
- Text Analysis: Analyze text for sentiment and extract keywords.
- Live Data: Monitor and visualize real-time data streams.
You can easily install PyInsight using pip:
pip install pyinsight
Alternatively, install from the source:
-
Clone the repository:
git clone https://github.com/Mehranalam/pyinsight.git cd pyinsight
-
Install the dependencies:
pip install -r requirements.txt
-
Install the package:
pip install .
Here’s how you can start using PyInsight:
-
Import the Library:
import pandas as pd from pyinsight.interactive import InteractiveTable, InteractivePlot
-
Create a DataFrame:
data = pd.DataFrame({ "Name": ["mehran", "ali", "matin", "elnaz"], "Age": [24, 27, 22, 32], "City": ["tehran", "gilan", "boshehr", "karaj"] })
-
Interactive Tables:
table = InteractiveTable(data) table.show() filtered_table = table.filter("City", "karaj") filtered_table.show()
-
Interactive Plots:
plot = InteractivePlot(data, "Name", "Age") plot.show()
-
Text Analysis:
from pyinsight.text_analysis import TextAnalysis text = "Python is a great programming language." analysis = TextAnalysis(text) print("Sentiment:", analysis.sentiment()) print("Keywords:", analysis.keywords())
-
Live Data:
from pyinsight.live_data import LiveDataPlot live_plot = LiveDataPlot(update_interval=2) live_plot.start()
import pandas as pd
from pyinsight.interactive import InteractiveTable
data = pd.DataFrame({
"Name": ["mehran", "ali", "matin", "elnaz"],
"Age": [24, 27, 22, 32],
"City": ["tehran", "gilan", "boshehr", "karaj"]
})
table = InteractiveTable(data)
table.show()
filtered_table = table.filter("City", "karaj")
filtered_table.show()
from pyinsight.interactive import InteractivePlot
data = pd.DataFrame({
"Name": ["ali", "matin", "sanaz", "javad"],
"Age": [24, 27, 22, 32]
})
plot = InteractivePlot(data, "Name", "Age")
plot.show()
from pyinsight.text_analysis import TextAnalysis
text = "Python is versatile and used in many fields."
analysis = TextAnalysis(text)
print("Sentiment:", analysis.sentiment())
print("Keywords:", analysis.keywords())
from pyinsight.live_data import LiveDataPlot
live_plot = LiveDataPlot(update_interval=1)
live_plot.start()
For detailed Documentation, please refer to the Documentation.
We welcome contributions to PyInsight! If you would like to contribute, please:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Create a new Pull Request.
PyInsight is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
For any questions or feedback, please contact:
- Author: Mehran Alam Beigi
- Email: Mehraxxn@gmail.com
- GitHub: Mehranalam