I am trying to below file operation using python

input 1: unix shell cat command given below data file name: input1.txt

```
11/13/2020 07:41:09 TREE count1: id1 green001
11/13/2020 07:43:09 TREE count1: id1 black001
11/13/2020 07:45:09 TREE count1: id2 black001
11/13/2020 07:45:09 PLAN count1: id3 green002

```

Lookup data: file name: lookup.csv

```
ID,item,message
id1,item1,message 1
id2,item2,message 2
id3,item3,message 3

```

Need output like: where id field in [id1, id2, id3, etc ..in] input1 lookup in ID filed in lookup table.\

Output.txt

```
Time,Type,counts,id,item,message,colour
11/13/2020 07:41:09,TREE,count1,id1,item1,message 1,green001
11/13/2020 07:43:09,TREE,count1,id1,item1,message 1,black001
11/13/2020 07:45:09,TREE,count1,id2,item2,message 2,black001
11/13/2020 07:45:09,PLAN,count1,id3,item3,message 3,green002

```

I've been trying to use this code, but I am getting errors.

```
r = pandas.read_csv(file1, sep=' ', index_col='ID')
with open('/home/s/lookup.csv','r') as w:
    x = pandas.read_csv(w)
    # w is not indexable
    col = w['ID']
    for line in w:
        # w is not a table.
        for col in w:
            for row in r:
                if row in col:
                    print(line)

```

Any advice would be appreciated!
['https://Stackoverflow.com/questions/64841086', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/14632454/']
Ok. Just for anyone wondering

Just uninstalling and reinstalling the packages that were giving the error worked for me

```
pip uninstall matplotlib
pip install matplotlib

```
I had the same issue - a Python program that was working fine before updating to Big Sur, and crashing with:

```
Segmentation fault: 11

```

after updating.

As previous responses have advised, just uninstalling and reinstalling the offending Python libraries fixed the problem. For me, that meant matplotlib:

```
pip uninstall matplotlib 
pip install matplotlib 

```

Thank you!