Wednesday 10 November 2021

Python Panda Find and Replace a value

For the issue I was trying to solve, I knew which Column this value would appear in.  It is also the entire contents of the cell that I need to replace. 

After searching for 'python panda find and replace a value' I found this post  https://www.geeksforgeeks.org/python-pandas-dataframe-replace/ 

This suggests 

df.replace(to_replace ="Text I don't want",
                 value ="Text I do want")

However this didn't work for me.  What did work was to name the column specifically and to use 'str.replace', as mentioned here 

https://stackoverflow.com/questions/53141072/replacing-column-data-with-pandas-replace-not-working

uk['my_col'] = uk['my_col'].str.replace("Text I don't want", "Text I do want")

Wednesday 3 November 2021

Importing .Csv data into a table in Sequel Pro.

First you need to CREATE your table. 

Now click on the Table name on the left hand site of the Sequel Pro console. 

Next, select File > Import from the top Menu bar. 


From here on you'll have a wizard that'll talk you through the column matching. 


And that's it.