I would like to know is there any widget like c# (Data Grid View) that displays the data in row and column?
I retrieve data from postgreSQL
The pandas library (http://pandas.pydata.org/), specifically the DataFrame. You can display the table in multiple formats, from HTML (if you're using IPython Notebook, for example) to LaTeX via the functions to_html() or to_latex(), as well as a tabbed printing for working from a console. It does not give you interactive editing within the display, but you can view any portion of the data. It can also read sql directly into a Data Frame.
Related
So I'm building a data entry app for shop floor operators (manufacturing) to use so they can log inventory tags that are entered into our main inventory system. Users enter the requested data and the program appends the data to a CSV file. The CSV file is connected to Excel to provide the supervisor with a real-time view of tags entered. However, I also want to provide a view of entered tags so that the user has a list built within the app. To do this, I'm using Pandas to re-import the CSV into the app and display the X number of tags entered. If I print the variable with the pandas dataframe assigned, the data is nicely organized into columns and rows (with header) in my VS Code terminal.
The problem: even though the data displays in my app, the data isn't really organized (aligned) in nice even columns. Is there something I'm not doing or am doing wrong? If needed, I can provide code...but one should be familiar with Flet.
Thank you!!
visualizing a pandas dataframe usually works better with the display built-in function rather than print, but without any code it's hard to see if that would help here. Another option might be to get it created as an image first and then displayed.
I generate this spreadsheet via python and pandas. After generating the .xlsx file,
i would go into Excel and format it using the table Format as table button on the main ribbon.
I decided that i didn't want to manually format the spreadsheet so I started using Openpyxl to attempt to mimic my formats.
my main hiccup is that after i use the format as table button
I would then click on Convert to Range.
The problem is, i cant seem to be able to do this using openpyx.
Does anyone know how to do this? I don't want to create my own personalized style if one already exists.
this is the code i have been using
tab = Table(displayName="Final', ref='A1:O34', tableType=None)
style = TableStyleInfo(name="TableStyleLight2", showFirstColumn=False,
showLastColumn=False, showRowStripes=True, showColumnStripes=False)
tab.tablestyleInfo = style
ws.add_table(tab)
wb.save()
Very basic and to the point, more or less copied from teh openpyxl documents.
How do i convert this table to a range of values from openpyxl
thanks
Damn Groundhog
Have you looked at xlsxwriter? It has an option to turn the autofilter on/off when creating a table.
Currently, I am doing repeated work like find and replace some content in PowerPoint. And I find some codes to F&R the text in the text-box or table. However, I cannot F&R those words in the chart that I need to edit in excel. Is there any possible solution? Instead of extracting the data to create a new chart.
Charts in Powerpoint are a little tricky, as they are stored in two places.
You'll need to first edit the "real" chart data by loading the excel behind (in C# this is the EmbeddedData section), and then update the cached values that Powerpoint has. These are descendants of the chartspace. If you don't do this, then you have to click in and out of the slide deck to trick Powerpoint into updating. I'm afraid I don't have python code to do that as I did the same in C#/Dotnet for slidetemplater.com
That does however have a python API too (https://pypi.org/project/slidetemplater/)
I want to write a hopefully short python script that would do things with the contents of a specially formatted text cell of an spss data table.
How can I hook on the event that the user clicked into a data cell? How can I then get its value and do things I want? Does spss have clear-cut interface for doing this?
You cannot catch events using the programmability or scripting apis. The only formatting in the Data Editor comes from variable formats (and column width) except for the special coloring using with missing data imputation. Tables in the Viewer, of course, have extensive cell formatting capabilities.
I have a Python 2.6 app running on Linux that creates a CSV file. From the app, I need to create an HTML report, as a single HTML file, that presents the data from the CSV (probably as a table) and also highlights fields where the values meet certain criteria. Charting type functionality would be a nice to have.
What's the best way to do this?
No GPL stuff please.
Choose a Python csv library from here. Now that you have the data mapped to Python data structures you can iterate on it and create the html. I would use the Jinja2 templating engine which is nicely documented. Highlighting rows/cells would work by setting certain css classes on the respective tr/td elements in the table.