Python Forum
Python: Automated Script to Read Multiple Files in Respective Matrices
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python: Automated Script to Read Multiple Files in Respective Matrices
#4
If you have several operations on the data, your way is fine. You can temporarily (or in a loop) assign it to a shorter name (like "a" in your example) and then do your work.

But if you just need the element, you can do it in one line instead of two with

print(matrix_data["file2.txt"][1,1])
Reply


Messages In This Thread
RE: Python: Automated Script to Read Multiple Files in Respective Matrices - by bowlofred - Jul-02-2020, 10:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using a script to open multiple shells? SuchUmami 9 632 Apr-01-2024, 10:04 AM
Last Post: Gribouillis
  Eliminate entering QR - Whatsapp web automated by selenium akanowhere 1 3,126 Jan-21-2024, 01:12 PM
Last Post: owalahtole
  python convert multiple files to multiple lists MCL169 6 1,632 Nov-25-2023, 05:31 AM
Last Post: Iqratech
  splitting file into multiple files by searching for string AlphaInc 2 950 Jul-01-2023, 10:35 PM
Last Post: Pedroski55
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,404 Jun-29-2023, 11:57 AM
Last Post: gologica
Question Need help for a python script to extract information from a list of files lephunghien 6 1,148 Jun-12-2023, 05:40 PM
Last Post: snippsat
  script to calculate data in csv-files ledgreve 0 1,139 May-19-2023, 07:24 AM
Last Post: ledgreve
  Merging multiple csv files with same X,Y,Z in each Auz_Pete 3 1,225 Feb-21-2023, 04:21 AM
Last Post: Auz_Pete
  unittest generates multiple files for each of my test case, how do I change to 1 file zsousa 0 985 Feb-15-2023, 05:34 PM
Last Post: zsousa
  How to read in mulitple files efficiently garynewport 3 917 Jan-27-2023, 10:44 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020