Data transfer between files , SQL Database and Dataframes Type A Sumita arora IP Solution



Q1. What are advantages of CSV file formats?



Q2. What all libraries do you require in order to bring data from a CSV file into a dataframe?



Q3. You want to read data from a CSV file in a dataframe but you want to provide your own column names to dataframe. What additional argument would you specify in read_csv( )?



Q4. By default, read_csv() uses the values of first row as column headers in dataframes. Which argument will you give to ensure that the top/first row's data is used as data and not as column headers?



Q5. Which argument would you give to read.csv) if you only want to read top 10 rows of data?



Q6. Write command to store data of dataframe mdf into a CSV file Mydata.csv, with separator character as '@'.



Q7. Why do you need connection to an SQL database in order to get data from a table?



Q8. What is pymysql library of Python?



Q9. What all libraries do you require in order to interact with MySQL databases (and dataframe) from within Python?



Q10. What additional argument do you need to specify in to_sql() so that old data of MySQL table is retained?



Q11. If query is a string storing an SQL statement. Write statements so that the data is fetched based on query from SQL database Mydata.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post