Top Related Projects
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
A VIM-inspired filemanager for the console
Postgres CLI with autocompletion and syntax highlighting
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
Library for building powerful interactive command line applications in Python
Quick Overview
VisiData is a terminal user interface (TUI) for exploring and analyzing data. It provides a powerful and flexible interface for working with tabular data, allowing users to quickly navigate, filter, and transform data from a variety of sources.
Pros
- Versatile Data Handling: VisiData supports a wide range of data formats, including CSV, Excel, SQL databases, and more, making it a versatile tool for data exploration and analysis.
- Efficient Workflow: VisiData's keyboard-driven interface and extensive set of shortcuts and commands enable users to perform complex data operations quickly and efficiently.
- Interactive Exploration: VisiData allows users to interactively explore and manipulate data, with features like sorting, filtering, and column transformations.
- Customizable and Extensible: VisiData is highly customizable, with the ability to create custom sheets, keybindings, and plugins to extend its functionality.
Cons
- Steep Learning Curve: VisiData's powerful features and keyboard-driven interface can have a steep learning curve for users unfamiliar with terminal-based tools.
- Limited Visualization Options: While VisiData provides some basic visualization capabilities, it may not be the best choice for users who require more advanced data visualization features.
- Dependency on Terminal Environment: VisiData is a terminal-based tool, which may not be suitable for users who prefer a graphical user interface (GUI) or are not comfortable working in a terminal environment.
- Potential Performance Issues: For very large datasets, VisiData may experience performance issues, as it loads the entire dataset into memory.
Code Examples
VisiData is a Python-based library, and the following examples demonstrate some of its key features:
import visidata
# Open a CSV file
sheet = visidata.open('data.csv')
# Sort the sheet by a column
sheet.sort('column_name')
# Filter the sheet based on a condition
sheet.filter(lambda row: row['column_name'] > 10)
# Pivot the sheet to create a new view
pivoted_sheet = sheet.pivot('row_column', 'column_column', 'value_column')
These examples show how to open a CSV file, sort the data, filter the data based on a condition, and pivot the data to create a new view.
Getting Started
To get started with VisiData, follow these steps:
- Install VisiData using pip:
pip install visidata
-
Open a terminal and run the
vd
command to start VisiData. -
In the VisiData interface, you can navigate to a data file (e.g., a CSV file) using the arrow keys and press Enter to open it.
-
Once the data is loaded, you can use various commands and shortcuts to explore and manipulate the data. Some common commands include:
s
: Sort the data by a columnf
: Filter the data based on a conditionp
: Pivot the data to create a new viewg
: Group the data by one or more columnsc
: Create a new column by applying a function to the data
-
You can also customize VisiData by creating custom sheets, keybindings, and plugins. The VisiData documentation provides detailed information on how to do this.
Competitor Comparisons
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
Pros of mitmproxy
- Specialized for intercepting and analyzing HTTP/HTTPS traffic
- Powerful scripting capabilities for automating network operations
- Extensive documentation and active community support
Cons of mitmproxy
- Steeper learning curve for non-network professionals
- Limited functionality outside of network traffic analysis
- Requires more setup and configuration for basic usage
Code Comparison
mitmproxy:
def request(flow: http.HTTPFlow) -> None:
if flow.request.pretty_url.endswith(".js"):
flow.response = http.HTTPResponse.make(
200, # (optional) status code
b"console.log('Hello from mitmproxy!')", # response body
{"Content-Type": "application/javascript"} # (optional) headers
)
VisiData:
@VisiData.api
def open_http(vd, p):
return vd.open_pandas(pd.read_html(p.given, flavor='bs4')[0])
Summary
mitmproxy is a specialized tool for network traffic analysis and manipulation, offering powerful scripting capabilities but with a steeper learning curve. VisiData, on the other hand, is a more general-purpose data exploration tool with a focus on ease of use and versatility across various data formats. While mitmproxy excels in network-related tasks, VisiData provides a broader range of data manipulation features for different file types and sources.
A VIM-inspired filemanager for the console
Pros of ranger
- File system-focused: Optimized for navigating and managing directories and files
- Customizable keybindings and color schemes
- Integrates well with terminal workflows and other CLI tools
Cons of ranger
- Limited data analysis capabilities
- Less suitable for working with structured data formats (CSV, JSON, etc.)
- Steeper learning curve for non-technical users
Code comparison
ranger:
def draw(self):
self.win.erase()
line = 0
for direntry in self.content[self.scroll_begin:self.scroll_end]:
self.win.addnstr(line, 0, direntry.basename, self.wid)
line += 1
self.win.refresh()
VisiData:
def draw(self, scr):
for i, row in enumerate(self.rows[self.topRowIndex:]):
if i > self.nVisibleRows:
break
self.drawRow(scr, i, row)
if self.nRows == 0:
self.drawEmptyMessage(scr)
Key differences
- ranger focuses on file system operations, while VisiData excels at data manipulation and analysis
- ranger uses a three-pane view for file navigation, whereas VisiData employs a spreadsheet-like interface
- VisiData supports a wider range of data formats and provides more advanced data processing features
- ranger is better suited for users who primarily work with files and directories in a terminal environment
- VisiData offers more powerful data exploration and visualization capabilities for tabular and structured data
Postgres CLI with autocompletion and syntax highlighting
Pros of pgcli
- Specialized for PostgreSQL, offering deep integration and advanced features
- Auto-completion for SQL commands, table names, and column names
- Syntax highlighting for SQL queries, enhancing readability
Cons of pgcli
- Limited to PostgreSQL databases, lacking VisiData's versatility for various data formats
- Focused on command-line interaction, without VisiData's spreadsheet-like interface
- Less suitable for quick data exploration and manipulation of non-SQL data sources
Code Comparison
pgcli:
# Example of pgcli usage
$ pgcli mydatabase
mydatabase=> SELECT * FROM users WHERE age > 30;
VisiData:
# Example of VisiData usage
$ vd users.csv
# Interactive spreadsheet-like interface appears
Key Differences
- Purpose: pgcli is a PostgreSQL client, while VisiData is a multi-purpose data exploration tool
- Interface: pgcli provides a command-line interface, VisiData offers a terminal-based spreadsheet view
- Data sources: pgcli works exclusively with PostgreSQL, VisiData supports various file formats and databases
- Functionality: pgcli focuses on SQL query execution and database management, VisiData excels in data manipulation and analysis
Both tools serve different purposes and excel in their respective domains. pgcli is ideal for PostgreSQL database management and querying, while VisiData offers broader data exploration capabilities across multiple formats.
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
Pros of mycli
- Specialized for MySQL, MariaDB, and Percona databases with auto-completion and syntax highlighting
- Offers a more user-friendly interface for SQL queries with features like multi-line editing
- Provides database-specific functionality like transaction support and SSL connections
Cons of mycli
- Limited to MySQL-compatible databases, while VisiData supports various data formats
- Lacks the extensive data manipulation and analysis features of VisiData
- Primarily focused on command-line interaction, whereas VisiData offers a more visual approach
Code Comparison
mycli:
@special_command('\\dt', '\\dt [table]', 'Show tables.')
def list_tables(self, arg=None):
query = 'SHOW TABLES'
if arg:
query += " LIKE '{0}'".format(arg)
try:
cur = self.cur
cur.execute(query)
tables = cur.fetchall()
for table in tables:
print(table[0])
except Exception as e:
click.secho(str(e), err=True, fg='red')
VisiData:
@VisiData.api
def open_mysql(vd, p):
return MySQLSheet(p.name, source=p, rows=[], columns=[])
class MySQLSheet(Sheet):
def reload(self):
conn = mysql.connector.connect(**self.source.kwargs)
self.columns = []
self.rows = []
with conn.cursor() as cursor:
cursor.execute(self.source.query)
self.columns = [ColumnItem(name, type=type(val).__name__) for name, val in zip(cursor.column_names, cursor.fetchone())]
self.rows = list(cursor)
A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
Pros of PyAutoGUI
- Focuses on GUI automation and screen interaction
- Provides cross-platform support for Windows, macOS, and Linux
- Offers simple and intuitive API for simulating mouse and keyboard inputs
Cons of PyAutoGUI
- Limited to GUI automation tasks, not suitable for data analysis
- Requires careful use to avoid unintended actions on the system
- May be less efficient for processing large datasets compared to VisiData
Code Comparison
PyAutoGUI example:
import pyautogui
pyautogui.moveTo(100, 100, duration=0.25)
pyautogui.click()
pyautogui.typewrite("Hello, world!")
VisiData example:
import visidata
vd = visidata.VisiData()
sheet = vd.open_csv("data.csv")
vd.run(sheet)
While PyAutoGUI excels at automating GUI interactions, VisiData is designed for efficient data exploration and analysis. PyAutoGUI's code focuses on simulating user actions, whereas VisiData's code demonstrates opening and exploring a CSV file. The choice between these tools depends on whether the task involves GUI automation or data manipulation and visualization.
Library for building powerful interactive command line applications in Python
Pros of python-prompt-toolkit
- More focused on building interactive command-line interfaces
- Extensive documentation and examples
- Wider adoption and community support
Cons of python-prompt-toolkit
- Less specialized for data analysis tasks
- Steeper learning curve for complex applications
- Requires more code to achieve similar functionality as VisiData
Code Comparison
VisiData:
import visidata
vd = visidata.VisiData()
vd.run("example.csv")
python-prompt-toolkit:
from prompt_toolkit import prompt
from prompt_toolkit.completion import WordCompleter
completer = WordCompleter(['hello', 'world'])
user_input = prompt('> ', completer=completer)
Summary
VisiData is a powerful tool for data exploration and analysis, offering a more specialized approach for working with various data formats. It provides a quick and efficient way to visualize and manipulate data directly in the terminal.
python-prompt-toolkit, on the other hand, is a more general-purpose library for building interactive command-line interfaces. It offers greater flexibility and customization options for creating complex CLI applications but requires more setup and code for data-specific tasks.
The choice between the two depends on the specific use case. VisiData is ideal for rapid data analysis and exploration, while python-prompt-toolkit is better suited for building custom interactive CLI applications with advanced features like auto-completion and syntax highlighting.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
VisiData v3.1
A terminal interface for exploring and arranging tabular data.
VisiData supports tsv, csv, sqlite, json, xlsx (Excel), hdf5, and many other formats.
Platform requirements
- Linux, OS/X, or Windows (with WSL)
- Python 3.8+
- additional Python modules are required for certain formats and sources
Install
To install the latest release from PyPi:
pip3 install visidata
To install the cutting edge develop
branch (no warranty expressed or implied):
pip3 install git+https://github.com/saulpw/visidata.git@develop
See visidata.org/install for detailed instructions for all available platforms and package managers.
Usage
On Linux and OS/X
$ vd <input>
$ <command> | vd
On Windows
$ visidata <input>
$ <command> | visidata
Press Ctrl+Q
to quit at any time.
Hundreds of other commands and options are also available; see the documentation.
Documentation
- VisiData documentation
- Plugin Author's Guide and API Reference
- Quick reference (available within
vd
withCtrl+H
), which has a list of commands and options. - Intro to VisiData Tutorial by Jeremy Singer-Vine
Help and Support
If you have a question, issue, or suggestion regarding VisiData, please create an issue on Github or chat with us at #visidata on irc.libera.chat.
If you use VisiData regularly, please support me on Patreon!
License
Code in the stable
branch of this repository, including the main vd
application, loaders, and plugins, is available for use and redistribution under GPLv3.
Credits
VisiData is conceived and developed by Saul Pwanson <vd@saul.pw>
.
Anja Kefala <anja.kefala@gmail.com>
maintains the documentation and packages for all platforms.
Many thanks to numerous other contributors, and to those wonderful users who provide feedback, for helping to make VisiData the awesome tool that it is.
Top Related Projects
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
A VIM-inspired filemanager for the console
Postgres CLI with autocompletion and syntax highlighting
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
Library for building powerful interactive command line applications in Python
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot