How to write xpath expression for data-extracting with visibility_of_all_elements_located?

There is a table whose xpath is .//table[@id='target'] in target webpage, I want to get all data in the table (all text in td in the table). Should i write the wait.until statement

wait.until(EC.visibility_of_all_elements_located(By.XPATH, ".//table[@id='target']")))

or

wait.until(EC.visibility_of_all_elements_located(By.XPATH, ".//table[@id='target']//td")))

?

Answer

Both commands will NOT give you what you are looking for.
visibility_of_all_elements_located will NOT really wait for visibility of ALL the elements on the page matching the passed locator.
visibility_of_all_elements_located method actually waits for at least 1 element matching the passed locator to be visible.
So, to make sure all the elements are visible you will have to add some sleep after that command.
Also, I think that waiting for table internal elements visibility should be better than waiting for the table element itself visibility.
So, I would use something like this:

wait.until(EC.visibility_of_all_elements_located(By.XPATH, ".//table[@id='target']//td")))
time.sleep(1)